Skip to content

Commit

Permalink
Fix for one more AR deprecation warning when using edge Rails [#80]
Browse files Browse the repository at this point in the history
  • Loading branch information
rmm5t committed Sep 17, 2008
1 parent c60fa4b commit feed108
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/shoulda/active_record/assertions.rb
Expand Up @@ -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}"
Expand Down

0 comments on commit feed108

Please sign in to comment.