From feed1087bd185fcef97624ab2328f94f59415a2a Mon Sep 17 00:00:00 2001 From: Ryan McGeary Date: Tue, 16 Sep 2008 21:55:34 -0400 Subject: [PATCH] Fix for one more AR deprecation warning when using edge Rails [#80] --- lib/shoulda/active_record/assertions.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/shoulda/active_record/assertions.rb b/lib/shoulda/active_record/assertions.rb index af902c7..b485844 100644 --- a/lib/shoulda/active_record/assertions.rb +++ b/lib/shoulda/active_record/assertions.rb @@ -57,7 +57,7 @@ def assert_good_value(object_or_klass, attribute, value, error_message_to_avoid # @product = Product.new(:tangible => true) # assert_bad_value(Product, :price, "0") def assert_bad_value(object_or_klass, attribute, value, - error_message_to_expect = ::ActiveRecord::Errors.default_error_messages[:invalid]) + error_message_to_expect = DEFAULT_ERROR_MESSAGES[:invalid]) object = get_instance_of(object_or_klass) object.send("#{attribute}=", value) assert !object.valid?, "#{object.class} allowed #{value.inspect} as a value for #{attribute}"