controller_class.action_methods is not correct
Reported by Ian White | July 15th, 2008 @ 08:51 PM | in No-Milestone-Assigned
If any controller is introspecting its action_methods in a spec it will see a whole bunch of rspec methods and PP methods
eg. a controller with actions "some_action" and "other_action" will also have:
"pretty_print", "pretty_print_inspect", "rspec_verify", "pretty_print_cycle", "some_action", "received_message?", "stub!", "should_receive", "pretty_inspect", "should_not_receive", "rspec_reset", "pretty_print_instance_variables"
when you do controller.action_methods
patch with spec to follows
Comments and changes to this ticket
-
-
-
Ian White July 15th, 2008 @ 08:58 PM
Finally, this is the spec failure before the fix is applied
1) 'HideNonActionsSpecController #action_methods should only be set of actions' FAILED expected: #<Set: {"some_action", "other_action"}>, got: #<Set: {"other_action", "pretty_print", "pretty_print_inspect", "rspec_verify", "pretty_print_cycle", "some_action", "received_message?", "stub!", "should_receive", "pretty_inspect", "should_not_receive", "rspec_reset", "pretty_print_instance_variables"}> (using ==) ./vendor/plugins/rspec-rails/spec/rails/example/hide_non_actions_spec.rb:17: -
Ian White July 16th, 2008 @ 07:31 AM
- no changes were found...
-
Ian White July 16th, 2008 @ 07:31 AM
- → Tag changed from rspec_controller to controllers patch rspec_controller rspec_on_rails
Adding patch as git-formatted-patch
-
David Chelimsky August 5th, 2008 @ 10:22 AM
- → Assigned user changed from to David Chelimsky
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 »
Behaviour Driven Development for Ruby.
