Sha256: 2ab448b577e20de1ec2079e097f40dc438f39e45629e22fdf295c5208695138f
Contents?: true
Size: 555 Bytes
Versions: 2
Compression:
Stored size: 555 Bytes
Contents
require_relative "spec_helper" require "irb" require "open3" require "stringio" require "cute_print" describe CutePrint do 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 "q {1 + 2}" stdin.close [stdout.read, stderr.read] end expect(stderr_output).to eq "(1 + 2) is 3\n" end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
cute_print-1.1.0 | spec/irb_spec.rb |
cute_print-1.0.1 | spec/irb_spec.rb |