When I execute following spec file, rspec can't be finish(can't display
shell prompt).
How do I check StopIteration?
I'm using
/Users/niku% ruby -v
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-darwin11.2.0]
/Users/niku% rspec -v
2.7.1
describe do
subject { [1,2].to_enum }
it do
# expect { 2.times{ subject.next } }. # failure, but it can be finish
expect { 3.times{ subject.next } }.
to raise_error(StopIteration)
end
end
_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users