aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/test
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-11-04 11:41:05 -0200
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-11-04 11:41:05 -0200
commitb1fe78e0cb81d6d291b982927353c4fa39d8e269 (patch)
treefc4d897bb560b26a5ecbe71bfa280fc52d9aec82 /activemodel/test
parentd9f20c575a29e8ec8eb549aae63b7c304dc27489 (diff)
downloadrails-b1fe78e0cb81d6d291b982927353c4fa39d8e269.tar.gz
rails-b1fe78e0cb81d6d291b982927353c4fa39d8e269.tar.bz2
rails-b1fe78e0cb81d6d291b982927353c4fa39d8e269.zip
Raise ArgumentError when no attribute is given to AMo::EachValidator
ArgumentError is better suited than RuntimeError for this.
Diffstat (limited to 'activemodel/test')
-rw-r--r--activemodel/test/cases/validations/with_validation_test.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activemodel/test/cases/validations/with_validation_test.rb b/activemodel/test/cases/validations/with_validation_test.rb
index 07c1bd0533..457f553661 100644
--- a/activemodel/test/cases/validations/with_validation_test.rb
+++ b/activemodel/test/cases/validations/with_validation_test.rb
@@ -151,7 +151,7 @@ class ValidatesWithTest < ActiveModel::TestCase
end
test "each validator expects attributes to be given" do
- assert_raise RuntimeError do
+ assert_raise ArgumentError do
Topic.validates_with(ValidatorPerEachAttribute)
end
end