Permalink
Browse files

Fix for one more AR deprecation warning when using edge Rails [#80]

  • Loading branch information...
1 parent c60fa4b commit feed1087bd185fcef97624ab2328f94f59415a2a @rmm5t rmm5t committed Sep 17, 2008
Showing with 1 addition and 1 deletion.
  1. +1 −1 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}"

0 comments on commit feed108

Please sign in to comment.