diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-12-29 19:43:07 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-12-29 19:43:07 +0000 |
commit | 20d29b379767713c64397a28105d1b74f0f36f5f (patch) | |
tree | 4f15147e5e0198d48981fb0835e33f583a92f3c5 /activerecord/test/aggregations_test.rb | |
parent | 1bb208d7e5c7147ed12e1e2fd0cd24b5054eceac (diff) | |
download | rails-20d29b379767713c64397a28105d1b74f0f36f5f.tar.gz rails-20d29b379767713c64397a28105d1b74f0f36f5f.tar.bz2 rails-20d29b379767713c64397a28105d1b74f0f36f5f.zip |
Ruby 1.9 compat: introduce ActiveSupport::FrozenObjectError normalize TypeError vs RuntimeError handling. Closes #10645 [Frederick Cheung]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8510 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test/aggregations_test.rb')
-rw-r--r-- | activerecord/test/aggregations_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/aggregations_test.rb b/activerecord/test/aggregations_test.rb index ea0339c63a..caa26a2091 100644 --- a/activerecord/test/aggregations_test.rb +++ b/activerecord/test/aggregations_test.rb @@ -25,7 +25,7 @@ class AggregationsTest < Test::Unit::TestCase def test_immutable_value_objects customers(:david).balance = Money.new(100) - assert_raises(TypeError) { customers(:david).balance.instance_eval { @amount = 20 } } + assert_raise(ActiveSupport::FrozenObjectError) { customers(:david).balance.instance_eval { @amount = 20 } } end def test_inferred_mapping @@ -90,7 +90,7 @@ class AggregationsTest < Test::Unit::TestCase end def test_nil_raises_error_when_allow_nil_is_false - assert_raises(NoMethodError) { customers(:david).balance = nil } + assert_raise(NoMethodError) { customers(:david).balance = nil } end def test_allow_nil_address_loaded_when_only_some_attributes_are_nil |