Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 28 lines (23 sloc) 1.184 kb
7df97d7 @jferris Added a test for the installation process
jferris authored
1 Feature: Install the Gem in a Rails application
2
3 Background:
4 Given I have built and installed the "hoptoad_notifier" gem
5
6 Scenario: Use config.gem without vendoring the gem in a Rails application
7 When I generate a new Rails application
8 And I configure the Hoptoad shim
9 And I configure my application to require the "hoptoad_notifier" gem
10 And I run "script/generate hoptoad -k myapikey"
11 And I run "rake hoptoad:test --trace"
12 Then I should receive a Hoptoad notification
022a1a3 @jferris Added scenarios for missing api key/configuring by hand
jferris authored
13
14 Scenario: Configure the notifier by hand
15 When I generate a new Rails application
16 And I configure the Hoptoad shim
17 And I configure the notifier to use "myapikey" as an API key
18 And I configure my application to require the "hoptoad_notifier" gem
19 And I run "script/generate hoptoad"
20 And I run "rake hoptoad:test --trace"
21 Then I should receive a Hoptoad notification
22
23 Scenario: Try to install without an api key
24 When I generate a new Rails application
25 And I configure my application to require the "hoptoad_notifier" gem
26 And I run "script/generate hoptoad"
27 Then I should see "Must pass --api-key or create config/initializers/hoptoad.rb"
Something went wrong with that request. Please try again.