Skip to content
This repository has been archived by the owner on Oct 1, 2019. It is now read-only.

Commit

Permalink
Added feature: Support the Heroku addon in the generator
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason Morrison committed Jun 16, 2010
1 parent 13d35f5 commit abb2040
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions features/rails.feature
Expand Up @@ -106,3 +106,31 @@ Feature: Install the Gem in a Rails application
And I run "rm Capfile"
And I run the hoptoad generator with "-k myapikey"
Then "config/deploy.rb" should not contain "capistrano"

@wip
Scenario: Support the Heroku addon in the generator
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 "--heroku"
Then my initializer should contain the following line:
"""
config.api_key = ENV['HOPTOAD_API_KEY']
"""
When I export the environment variable HOPTOAD_API_KEY" to be "myapikey"
And I define a response for "TestController#index":
"""
session[:value] = "test"
raise RuntimeError, "some message"
"""
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 abb2040

Please sign in to comment.