[rspec-users] "should.be_in [values]" and "each_should_satisfy"

Esad Hajdarevic esad at esse.at
Tue Feb 13 10:22:47 EST 2007


I just started using RSpec and have some question that I couldn't find 
answers to.

If I have a result that can have two valid values, is there a better way 
of writing
the following assertion?

[value1,value2].should_include actual

Is there a more elegant way of performing should_satisfy on a 
collection, for
example I currently use something like collection.each {|x| 
x.should_satisfy {|x| ... } }
which is very ugly. Is there something like each_should_satisfy?



More information about the rspec-users mailing list