spec/irb_spec.rb in cute_print-1.1.0 vs spec/irb_spec.rb in cute_print-1.1.1
- old
+ new
@@ -11,9 +11,11 @@
it "should be able to inspect source when called from irb" do
lib_path = File.join(File.dirname(__FILE__), "../lib/cute_print")
_stdout_output, stderr_output =
Open3.popen3("irb") do |stdin, stdout, stderr, wait_thr|
stdin.puts "require #{lib_path.inspect}"
+ stdin.puts "def foo"
+ stdin.puts "end"
stdin.puts "q {1 + 2}"
stdin.close
[stdout.read, stderr.read]
end
expect(stderr_output).to eq "(1 + 2) is 3\n"