aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/reloadable_test.rb
diff options
context:
space:
mode:
authorNicholas Seckar <nseckar@gmail.com>2006-08-08 21:21:04 +0000
committerNicholas Seckar <nseckar@gmail.com>2006-08-08 21:21:04 +0000
commit74165eb6acaca98d4da13409c4e5b5ecc9d260f7 (patch)
tree024158d20563f34cca52a00b42aaa6c922777559 /activesupport/test/reloadable_test.rb
parent94a1309194fa5962e33d395ede14e94b237c54f5 (diff)
downloadrails-74165eb6acaca98d4da13409c4e5b5ecc9d260f7.tar.gz
rails-74165eb6acaca98d4da13409c4e5b5ecc9d260f7.tar.bz2
rails-74165eb6acaca98d4da13409c4e5b5ecc9d260f7.zip
New dependencies implementation
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4728 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/test/reloadable_test.rb')
-rw-r--r--activesupport/test/reloadable_test.rb32
1 files changed, 32 insertions, 0 deletions
diff --git a/activesupport/test/reloadable_test.rb b/activesupport/test/reloadable_test.rb
index c330394b29..2ab19db77e 100644
--- a/activesupport/test/reloadable_test.rb
+++ b/activesupport/test/reloadable_test.rb
@@ -78,4 +78,36 @@ class ReloadableTest < Test::Unit::TestCase
assert ! results.include?(ReloadableTestSandbox.const_get(name)), "Expected #{name} NOT to be reloadable"
end
end
+
+ def test_including_reloadable_should_warn
+ c = Class.new
+ assert_deprecated %r{Reloadable} do
+ c.send :include, Reloadable
+ end
+
+ assert_deprecated { c.reloadable? }
+ end
+
+ def test_include_subclasses_should_warn
+ c = Class.new
+ deps = collect_deprecations do
+ c.send :include, Reloadable::Subclasses
+ end
+ assert_equal 1, deps.size
+ assert_match %r{Reloadable::Subclasses}, deps.first
+
+ assert_deprecated { c.reloadable? }
+ end
+
+ def test_include_deprecated_should_not_warn
+ c = Class.new
+ deps = collect_deprecations do
+ c.send :include, Reloadable::Deprecated
+ end
+ assert_equal 0, deps.size
+
+ assert c.respond_to?(:reloadable?)
+ assert_deprecated { c.reloadable? }
+ end
+
end