提交 09c5ed67 编写于 作者: J Justin Collins

Add test for rescan removed controller mixin method

上级 2cfc75f2
module UserControllerMixin
def mixed_in
@user = User.find(params[:id])
end
end
......@@ -211,4 +211,17 @@ class RescannerTests < Test::Unit::TestCase
assert_new 0
assert_fixed 1
end
def test_remove_route_from_mixin
lib = 'lib/user_controller_mixin.rb'
before_rescan_of lib do
remove_method lib, :mixed_in
end
assert_reindex :controllers, :templates
assert_changes
assert_new 0
assert_fixed 1
end
end
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册