Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 35 lines (29 sloc) 1.477 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 Then I should receive a Hoptoad notification
022a1a3 @jferris Added scenarios for missing api key/configuring by hand
jferris authored
12
ad3d087 @jferris Changed rake tasks to be included instead of copied
jferris authored
13 Scenario: vendor the gem and uninstall
14 When I generate a new Rails application
15 And I configure the Hoptoad shim
16 And I configure my application to require the "hoptoad_notifier" gem
17 And I run "rake gems:unpack"
18 And I uninstall the "hoptoad_notifier" gem
19 And I run "script/generate hoptoad -k myapikey"
20 Then I should receive a Hoptoad notification
21
022a1a3 @jferris Added scenarios for missing api key/configuring by hand
jferris authored
22 Scenario: Configure the notifier by hand
23 When I generate a new Rails application
24 And I configure the Hoptoad shim
25 And I configure the notifier to use "myapikey" as an API key
26 And I configure my application to require the "hoptoad_notifier" gem
27 And I run "script/generate hoptoad"
28 Then I should receive a Hoptoad notification
29
30 Scenario: Try to install without an api key
31 When I generate a new Rails application
32 And I configure my application to require the "hoptoad_notifier" gem
33 And I run "script/generate hoptoad"
34 Then I should see "Must pass --api-key or create config/initializers/hoptoad.rb"
Something went wrong with that request. Please try again.