Permalink
Browse files

Add missing assert_deprecated calls to prevent spam during test runs

  • Loading branch information...
1 parent e826c99 commit 9460d45988981005b5e91d3db2d3334b01bba3a8 @NZKoz NZKoz committed Sep 11, 2008
Showing with 6 additions and 2 deletions.
  1. +6 −2 activerecord/test/cases/aggregations_test.rb
@@ -130,12 +130,16 @@ def test_conversion_block_is_deprecated
end
def test_conversion_block_used_when_converter_option_is_nil
- Person.composed_of(:balance, :class_name => "Money", :mapping => %w(balance amount)) { |balance| balance.to_money }
+ assert_deprecated 'conversion block has been deprecated' do
+ Person.composed_of(:balance, :class_name => "Money", :mapping => %w(balance amount)) { |balance| balance.to_money }
+ end
assert_raise(NoMethodError) { Person.new.balance = 5 }
end
def test_converter_option_overrides_conversion_block
- Person.composed_of(:balance, :class_name => "Money", :mapping => %w(balance amount), :converter => Proc.new { |balance| Money.new(balance) }) { |balance| balance.to_money }
+ assert_deprecated 'conversion block has been deprecated' do
+ Person.composed_of(:balance, :class_name => "Money", :mapping => %w(balance amount), :converter => Proc.new { |balance| Money.new(balance) }) { |balance| balance.to_money }
+ end
person = Person.new
assert_nothing_raised { person.balance = 5 }

0 comments on commit 9460d45

Please sign in to comment.