diff options
author | Emilio Tagua <miloops@gmail.com> | 2010-06-24 11:17:05 -0300 |
---|---|---|
committer | Emilio Tagua <miloops@gmail.com> | 2010-06-24 11:17:05 -0300 |
commit | fdb7f84eb10c5e59490764a1a259aa00a1fcfe5f (patch) | |
tree | 90750a64cb361762d3d27920aa7dfa3d989da320 /activerecord/test/cases | |
parent | 7710a8cb6b0f3b8f94c130aa5d6062d45e34219c (diff) | |
download | rails-fdb7f84eb10c5e59490764a1a259aa00a1fcfe5f.tar.gz rails-fdb7f84eb10c5e59490764a1a259aa00a1fcfe5f.tar.bz2 rails-fdb7f84eb10c5e59490764a1a259aa00a1fcfe5f.zip |
Remove deprecated block usage in composed_of.
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/aggregations_test.rb | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/activerecord/test/cases/aggregations_test.rb b/activerecord/test/cases/aggregations_test.rb index e5fc1a2046..74588b4f47 100644 --- a/activerecord/test/cases/aggregations_test.rb +++ b/activerecord/test/cases/aggregations_test.rb @@ -121,34 +121,6 @@ class AggregationsTest < ActiveRecord::TestCase end end -class DeprecatedAggregationsTest < ActiveRecord::TestCase - class Person < ActiveRecord::Base; end - - def test_conversion_block_is_deprecated - assert_deprecated 'conversion block has been deprecated' do - Person.composed_of(:balance, :class_name => "Money", :mapping => %w(balance amount)) { |balance| balance.to_money } - end - end - - def test_conversion_block_used_when_converter_option_is_nil - 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 - 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 } - assert_equal 5, person.balance.amount - assert_kind_of Money, person.balance - end -end - class OverridingAggregationsTest < ActiveRecord::TestCase class Name; end class DifferentName; end |