diff options
author | Hiroshi SHIBATA <[email protected]> | 2025-01-23 16:40:19 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2025-01-24 15:46:46 +0900 |
commit | 6bdccb35fcbe0d5cefc63086a4fe25b0f1ede3ae (patch) | |
tree | 2791905cc38e7c8c2d412640a590acd0f580cc56 /spec/ruby/core | |
parent | 0fdc9b9fd168f9d25d78c79a9e970be7d0967363 (diff) |
Restructured irb related example at spec/ruby
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/12624
Diffstat (limited to 'spec/ruby/core')
-rw-r--r-- | spec/ruby/core/binding/fixtures/irb.rb | 3 | ||||
-rw-r--r-- | spec/ruby/core/binding/irb_spec.rb | 19 |
2 files changed, 0 insertions, 22 deletions
diff --git a/spec/ruby/core/binding/fixtures/irb.rb b/spec/ruby/core/binding/fixtures/irb.rb deleted file mode 100644 index 5f305f2d5d..0000000000 --- a/spec/ruby/core/binding/fixtures/irb.rb +++ /dev/null @@ -1,3 +0,0 @@ -a = 10 - -binding.irb diff --git a/spec/ruby/core/binding/irb_spec.rb b/spec/ruby/core/binding/irb_spec.rb deleted file mode 100644 index 2607c7ef33..0000000000 --- a/spec/ruby/core/binding/irb_spec.rb +++ /dev/null @@ -1,19 +0,0 @@ -require_relative '../../spec_helper' -require 'tmpdir' - -describe "Binding#irb" do - it "creates an IRB session with the binding in scope" do - irb_fixture = fixture __FILE__, "irb.rb" - envs = %w[IRBRC HOME XDG_CONFIG_HOME].to_h {|e| [e, nil]} - - out = Dir.mktmpdir do |dir| - IO.popen([envs, *ruby_exe, irb_fixture, chdir: dir], "r+") do |pipe| - pipe.puts "a ** 2" - pipe.puts "exit" - pipe.readlines.map(&:chomp).reject(&:empty?) - end - end - - out.last(3).should == ["a ** 2", "100", "exit"] - end -end |