diff options
author | José Valim <jose.valim@gmail.com> | 2010-01-17 09:53:57 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-01-17 09:54:24 +0100 |
commit | 645832cfdd90b6e8cb6e043bfeb25da0c39401af (patch) | |
tree | 6f3a4d446fe8105fa93ec624d65aef27841127c8 /actionpack | |
parent | 54a043895f904e0237a590738d494554ec555265 (diff) | |
download | rails-645832cfdd90b6e8cb6e043bfeb25da0c39401af.tar.gz rails-645832cfdd90b6e8cb6e043bfeb25da0c39401af.tar.bz2 rails-645832cfdd90b6e8cb6e043bfeb25da0c39401af.zip |
Clean up filter parameter logging tests.
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/test/controller/filter_params_test.rb | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/actionpack/test/controller/filter_params_test.rb b/actionpack/test/controller/filter_params_test.rb index d0635669c2..45949636c3 100644 --- a/actionpack/test/controller/filter_params_test.rb +++ b/actionpack/test/controller/filter_params_test.rb @@ -9,23 +9,6 @@ end class FilterParamTest < ActionController::TestCase tests FilterParamController - class MockLogger - attr_reader :logged - attr_accessor :level - - def initialize - @level = Logger::DEBUG - end - - def method_missing(method, *args) - @logged ||= [] - @logged << args.first unless block_given? - @logged << yield if block_given? - end - end - - setup :set_logger - def test_filter_parameters_must_have_one_word assert_raises RuntimeError do FilterParamController.filter_parameter_logging @@ -65,14 +48,4 @@ class FilterParamTest < ActionController::TestCase assert !FilterParamController.action_methods.include?('filter_parameters') assert_raise(NoMethodError) { @controller.filter_parameters([{'password' => '[FILTERED]'}]) } end - - private - - def set_logger - @controller.logger = MockLogger.new - end - - def logs - @logs ||= @controller.logger.logged.compact.map {|l| l.to_s.strip} - end end |