From b4b0fddb24b0e6cbff6936606689984274cecd15 Mon Sep 17 00:00:00 2001 From: Levente Bagi Date: Tue, 6 Mar 2012 16:24:04 +0000 Subject: Don't ignore call to undefined method in Sweeper --- actionpack/test/controller/sweeper_test.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 actionpack/test/controller/sweeper_test.rb (limited to 'actionpack/test/controller/sweeper_test.rb') diff --git a/actionpack/test/controller/sweeper_test.rb b/actionpack/test/controller/sweeper_test.rb new file mode 100644 index 0000000000..0561efc62f --- /dev/null +++ b/actionpack/test/controller/sweeper_test.rb @@ -0,0 +1,16 @@ +require 'abstract_unit' + + +class SweeperTest < ActionController::TestCase + + class ::AppSweeper < ActionController::Caching::Sweeper; end + + def test_sweeper_should_not_ignore_unknown_method_calls + sweeper = ActionController::Caching::Sweeper.send(:new) + assert_raise NameError do + sweeper.instance_eval do + some_method_that_doesnt_exist + end + end + end +end -- cgit v1.2.3