Skip to content

Commit

Permalink
Test that correct error is raised.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabe Berke-Williams committed Mar 23, 2012
1 parent ba78ed0 commit ca6d428
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions spec/shoulda/active_model/allow_value_matcher_spec.rb
Expand Up @@ -87,4 +87,12 @@
@matcher.description.should eq('allow baz to be set to "foo"')
end
end

context "an AllowValueMatcher with no values" do
it "raises an error" do
lambda do
allow_value.for(:baz)
end.should raise_error(ArgumentError, /at least one argument/)
end
end
end

0 comments on commit ca6d428

Please sign in to comment.