Skip to content
This repository has been archived by the owner on Nov 11, 2017. It is now read-only.

Commit

Permalink
Using respond_to? instead of checking instance_methods
Browse files Browse the repository at this point in the history
Signed-off-by: Nick Quaranto <nick@quaran.to>
  • Loading branch information
Jason Morrison authored and qrush committed Jun 17, 2009
1 parent fb16999 commit eee95a9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/configuration_test.rb
Expand Up @@ -10,7 +10,7 @@ def rescue_action e
rescue_action_in_public e
end
end
assert @controller.methods.include?("notify_hoptoad")
assert @controller.respond_to?(:notify_hoptoad)
end

should "be done with a block" do
Expand Down
2 changes: 1 addition & 1 deletion test/controller_test.rb
Expand Up @@ -20,7 +20,7 @@ def expect_session_data_for(controller)

def should_notify_normally
should "have inserted its methods into the controller" do
assert @controller.methods.include?("notify_hoptoad")
assert @controller.respond_to?(:notify_hoptoad)
end

should "prevent raises and send the error to hoptoad" do
Expand Down

0 comments on commit eee95a9

Please sign in to comment.