diff options
author | Michael Koziarski <michael@koziarski.com> | 2008-09-11 11:21:22 +0200 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2008-09-11 11:21:22 +0200 |
commit | 9460d45988981005b5e91d3db2d3334b01bba3a8 (patch) | |
tree | 7af49bc535f6142ba7a8aef809798eef9ad978e4 | |
parent | e826c992014b24475203bf1a88b3f7a2356f7ff5 (diff) | |
download | rails-9460d45988981005b5e91d3db2d3334b01bba3a8.tar.gz rails-9460d45988981005b5e91d3db2d3334b01bba3a8.tar.bz2 rails-9460d45988981005b5e91d3db2d3334b01bba3a8.zip |
Add missing assert_deprecated calls to prevent spam during test runs
-rw-r--r-- | activerecord/test/cases/aggregations_test.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/activerecord/test/cases/aggregations_test.rb b/activerecord/test/cases/aggregations_test.rb index b6656c8631..4e0e1c7f15 100644 --- a/activerecord/test/cases/aggregations_test.rb +++ b/activerecord/test/cases/aggregations_test.rb @@ -130,12 +130,16 @@ class DeprecatedAggregationsTest < ActiveRecord::TestCase 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 } |