diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2009-04-22 15:26:03 +0100 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2009-04-22 15:26:03 +0100 |
commit | 5f3f100ce2d689480da85abc88e5e940cf90189e (patch) | |
tree | 15c1a05a5308a9eea56d7f0889ac46d9cac5b57c /activesupport/test/memoizable_test.rb | |
parent | d758d996d1b66e2a65640f79f01ce2ac674d7ed5 (diff) | |
parent | ca49299434bc764b667cd86846d892e91a150ef3 (diff) | |
download | rails-5f3f100ce2d689480da85abc88e5e940cf90189e.tar.gz rails-5f3f100ce2d689480da85abc88e5e940cf90189e.tar.bz2 rails-5f3f100ce2d689480da85abc88e5e940cf90189e.zip |
Merge branch 'master' into active_model
Conflicts:
activeresource/lib/active_resource/validations.rb
Diffstat (limited to 'activesupport/test/memoizable_test.rb')
-rw-r--r-- | activesupport/test/memoizable_test.rb | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/activesupport/test/memoizable_test.rb b/activesupport/test/memoizable_test.rb index 39420c5a3a..214e243aa5 100644 --- a/activesupport/test/memoizable_test.rb +++ b/activesupport/test/memoizable_test.rb @@ -1,6 +1,6 @@ require 'abstract_unit' -class MemoizableTest < Test::Unit::TestCase +class MemoizableTest < ActiveSupport::TestCase class Person extend ActiveSupport::Memoizable @@ -125,8 +125,13 @@ class MemoizableTest < Test::Unit::TestCase end def test_memorized_results_are_immutable - assert_equal "Josh", @person.name - assert_raise(ActiveSupport::FrozenObjectError) { @person.name.gsub!("Josh", "Gosh") } + # This is purely a performance enhancement that we can revisit once the rest of + # the code is in place. Ideally, we'd be able to do memoization in a freeze-friendly + # way without amc hacks + pending do + assert_equal "Josh", @person.name + assert_raise(ActiveSupport::FrozenObjectError) { @person.name.gsub!("Josh", "Gosh") } + end end def test_reloadable |