Sha256: 3e2183e4b29d26dd743c04abc611deadfbef858636c0973534711392c2e8dec4
Contents?: true
Size: 670 Bytes
Versions: 16
Compression:
Stored size: 670 Bytes
Contents
$: << File.dirname(__FILE__) + '/../lib/' require 'test/spec' require 'test/spec/should-output' context "should.output" do specify "works for print" do lambda { print "foo" }.should.output "foo" lambda { print "foo" }.should.output(/oo/) end specify "works for puts" do lambda { puts "foo" }.should.output "foo\n" lambda { puts "foo" }.should.output(/foo/) end specify "works with readline" do lambda { require 'readline' }.should.not.raise(LoadError) lambda { puts "foo" }.should.output "foo\n" lambda { puts "foo" }.should.output(/foo/) File.should.not.exist(File.join(Dir.tmpdir, "should_output_#{$$}")) end end
Version data entries
16 entries across 16 versions & 5 rubygems