From b1fe78e0cb81d6d291b982927353c4fa39d8e269 Mon Sep 17 00:00:00 2001 From: Carlos Antonio da Silva Date: Sun, 4 Nov 2012 11:41:05 -0200 Subject: Raise ArgumentError when no attribute is given to AMo::EachValidator ArgumentError is better suited than RuntimeError for this. --- activemodel/test/cases/validations/with_validation_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activemodel/test') 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 -- cgit v1.2.3