J
Joe Van Dyk
StringIO can be used as a standin for a File object when testing, right?
require 'stringio'
def expects_file file
file.open
puts file.gets
end
s =3D StringIO.new "Hello World\nHow are you?"
expects_file s
What don't I understand here?
require 'stringio'
def expects_file file
file.open
puts file.gets
end
s =3D StringIO.new "Hello World\nHow are you?"
expects_file s
What don't I understand here?