Sha256: bb11d9212c922c19ef48048fe0ed625741276bb33c6533d8dfacdc4414bbcbc3
Contents?: true
Size: 647 Bytes
Versions: 83
Compression:
Stored size: 647 Bytes
Contents
require File.dirname(File.join(__rhoGetCurrentDir(), __FILE__)) + '/../fixtures/classes' describe :io_tty, :shared => true do with_tty do # Yeah, this will probably break. it "returns true if this stream is a terminal device (TTY)" do File.open('/dev/tty') {|f| f.send @method }.should == true end end it "returns false if this stream is not a terminal device (TTY)" do File.open(File.join(__rhoGetCurrentDir(), __FILE__).gsub(/\.rb/,".iseq")) {|f| f.send @method }.should == false end it "raises IOError on closed stream" do lambda { IOSpecs.closed_file.send @method }.should raise_error(IOError) end end
Version data entries
83 entries across 83 versions & 1 rubygems