[rspec-users] New RSpec methods to Object proposal: should_all and should_none
Rodrigo Rosenfeld Rosas
lbocseg at yahoo.com.br
Wed Dec 9 05:41:35 EST 2009
I was thinking that it would be great to add 2 additional methods to
Object: should_all and should_none.
The idea is that we would be able to write tests like:
[@admin, @allowed_user].should_all be_allowed_to_visit(url)
[@unprivileged, @non_welcome].should_none be_allowed_to_visit(url)
Implementation is trivial, but I think that tests would become much
cleaner than:
[@admin, @allowed_user].each{|u| u.should be_allowed_to_visit(url)}
Any thoughts on that?
Rodrigo.
__________________________________________________
Faça ligações para outros computadores com o novo Yahoo! Messenger
http://br.beta.messenger.yahoo.com/
More information about the rspec-users
mailing list