#11 new
Jacob

exception_notifiable test failure

Reported by Jacob | May 12th, 2008 @ 04:37 PM


jacob:exception_notification jacob$ cd test/
jacob:test jacob$ ruby exception_notifier_helper_test.rb 
Loaded suite exception_notifier_helper_test
Started
..E....
Finished in 0.000659 seconds.

  1) Error:
test_should_filter_env_values_for_raw_post_data_keys_if_controller_can_filter_parameters(ExceptionNotifierHelperTest):
NoMethodError: undefined method `values' for :filtered:Symbol
    ./../lib/exception_notifier_helper.rb:76:in `filter_sensitive_post_data_from_env'
    exception_notifier_helper_test.rb:46:in `test_should_filter_env_values_for_raw_post_data_keys_if_controller_can_filter_parameters'

7 tests, 7 assertions, 0 failures, 1 errors

The problem seems to be a symptom of the test defining a controller that does:

  def filter_parameters(params); :filtered end

Which is incompatible with what the actual plugin expects to be returned from this method...

Rails will automatically define filter_parameters as a method which takes a hash and returns a hash (if you define filter_parameter_logging) so I suspect that's what the mocked out version in the test should be doing too...

Here's a patch which does so.

Is this right?

Comments and changes to this ticket

Please Login or create a free account to add a new comment.

You can update this ticket by sending an email to from your email client. (help)

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

People watching this ticket