blob: d63372d9d70a2af7eaf834a94d9cdb6a86bed195 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
describe :argf_getc, shared: true do
before :each do
@file1 = fixture __FILE__, "file1.txt"
@file2 = fixture __FILE__, "file2.txt"
@chars = File.read @file1
@chars += File.read @file2
end
it "reads each char of files" do
argf [@file1, @file2] do
chars = +""
@chars.size.times { chars << @argf.send(@method) }
chars.should == @chars
end
end
end
|