Add a test passing mixed values to `allow_value`

This commit is contained in:
Melissa Xie 2013-03-28 10:34:50 -04:00
parent 0209b3e48c
commit 7e11f3e1d1
1 changed files with 4 additions and 0 deletions

View File

@ -80,6 +80,10 @@ describe Shoulda::Matchers::ActiveModel::AllowValueMatcher do
it "rejects several bad values (#{bad_values.map(&:inspect).join(', ')})" do
model.should_not allow_value(*bad_values).for(:attr)
end
it "rejects a mix of both good and bad values" do
model.should_not allow_value('12345', *bad_values).for(:attr)
end
end
context 'with a single value' do