This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

added a scenario for using the notify_hoptoad method within a controller

  • Loading branch information...
kylecrum authored and jasonm committed Sep 16, 2010
1 parent 631759b commit 652321d5f170104b402ab3012e8f4917b09c1fd5
Showing with 22 additions and 0 deletions.
  1. +22 −0 features/rails.feature
View
@@ -215,3 +215,25 @@ Feature: Install the Gem in a Rails application
| params | secret: [FILTERED] |
| session | secret: [FILTERED] |
| url | http://example.com:123/test/index?param=value |
+
+ Scenario: Notify hoptoad within the controller
+ When I generate a new Rails application
+ And I configure the Hoptoad shim
+ And I configure my application to require the "hoptoad_notifier" gem
+ And I run the hoptoad generator with "-k myapikey"
+ And I define a response for "TestController#index":
+ """
+ session[:value] = "test"
+ notify_hoptoad(RuntimeError.new("some message"))
+ render :nothing => true
+ """
+ And I route "/test/index" to "test#index"
+ And I perform a request to "http://example.com:123/test/index?param=value"
+ Then I should receive the following Hoptoad notification:
+ | component | test |
+ | action | index |
+ | error message | RuntimeError: some message |
+ | error class | RuntimeError |
+ | session | value: test |
+ | parameters | param: value |
+ | url | http://example.com:123/test/index?param=value |

0 comments on commit 652321d

Please sign in to comment.