diff options
Diffstat (limited to 'activesupport/test/flush_cache_on_private_memoization_test.rb')
-rw-r--r-- | activesupport/test/flush_cache_on_private_memoization_test.rb | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/activesupport/test/flush_cache_on_private_memoization_test.rb b/activesupport/test/flush_cache_on_private_memoization_test.rb deleted file mode 100644 index 20768b777a..0000000000 --- a/activesupport/test/flush_cache_on_private_memoization_test.rb +++ /dev/null @@ -1,45 +0,0 @@ -require 'abstract_unit' -require 'test/unit' - -class FlashCacheOnPrivateMemoizationTest < Test::Unit::TestCase - ActiveSupport::Deprecation.silence do - extend ActiveSupport::Memoizable - end - - def test_public - assert_method_unmemoizable :pub - end - - def test_protected - assert_method_unmemoizable :prot - end - - def test_private - assert_method_unmemoizable :priv - end - - def pub; rand end - memoize :pub - - protected - - def prot; rand end - memoize :prot - - private - - def priv; rand end - memoize :priv - - def assert_method_unmemoizable(meth, message=nil) - full_message = build_message(message, "<?> not unmemoizable.\n", meth) - assert_block(full_message) do - a = send meth - b = send meth - unmemoize_all - c = send meth - a == b && a != c - end - end - -end |