[rspec-users] rspec assert inclusion in..

slavix mikerin.slava at gmail.com
Sat Sep 3 20:30:00 EDT 2011

I would like to assert that an attribute of a model has value among
those in an array. How would I do it in rspec?

Something like this...

describe OptionType do
  context "shoulda validations" do
    it { assert_contains :type, ['Type1', 'Type1']}

More information about the rspec-users mailing list