I’m new to RSpec, and I’m trying to run “should == A || B”, but it’s ignoring the ‘B’ and is only comparing with ‘A’ (and thus failing when val is ‘B’):
Sample.find(:all).map(&:param).each{|val| val.should == 'A'||'B'}
Does anyone know how I include the ‘B’ in the comparison?
That might get your spec passing, but is it what you want to test? That the return value is a member of a set? If so, then perhaps this is a good solution.