spec/../initialize_spec.rb: skip fd-specific spec
https://gist.github.com/ko1/72c03695e81a54d40649f29d0c421f26 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
5c130f94f2
commit
9fa6af24f4
@ -23,16 +23,16 @@ describe "IO#initialize" do
|
|||||||
# initialize has closed the old descriptor
|
# initialize has closed the old descriptor
|
||||||
lambda { IO.for_fd(@fd).close }.should raise_error(Errno::EBADF)
|
lambda { IO.for_fd(@fd).close }.should raise_error(Errno::EBADF)
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
it "calls #to_int to coerce the object passed as an fd" do
|
it "calls #to_int to coerce the object passed as an fd" do
|
||||||
obj = mock('fileno')
|
obj = mock('fileno')
|
||||||
fd = new_fd @name, "r:utf-8"
|
fd = new_fd @name, "r:utf-8"
|
||||||
obj.should_receive(:to_int).and_return(fd)
|
obj.should_receive(:to_int).and_return(fd)
|
||||||
@io.send :initialize, obj, 'r'
|
@io.send :initialize, obj, 'r'
|
||||||
@io.fileno.should == fd
|
@io.fileno.should == fd
|
||||||
# initialize has closed the old descriptor
|
# initialize has closed the old descriptor
|
||||||
lambda { IO.for_fd(@fd).close }.should raise_error(Errno::EBADF)
|
lambda { IO.for_fd(@fd).close }.should raise_error(Errno::EBADF)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
it "raises a TypeError when passed an IO" do
|
it "raises a TypeError when passed an IO" do
|
||||||
|
Loading…
x
Reference in New Issue
Block a user