Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 66 lines (56 sloc) 2.807 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
1f87891 @jferris Added integration coverage and fixes for older versions of Rails
jferris authored
6 Scenario: Use the gem without vendoring the gem in a Rails application
7df97d7 @jferris Added a test for the installation process
jferris authored
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
1f87891 @jferris Added integration coverage and fixes for older versions of Rails
jferris authored
17 And I unpack the "hoptoad_notifier" gem
ad3d087 @jferris Changed rake tasks to be included instead of copied
jferris authored
18 And I run "script/generate hoptoad -k myapikey"
1f87891 @jferris Added integration coverage and fixes for older versions of Rails
jferris authored
19 And I uninstall the "hoptoad_notifier" gem
20 And I run "rake hoptoad:test"
21 Then I should receive two Hoptoad notifications
ad3d087 @jferris Changed rake tasks to be included instead of copied
jferris authored
22
022a1a3 @jferris Added scenarios for missing api key/configuring by hand
jferris authored
23 Scenario: Configure the notifier by hand
24 When I generate a new Rails application
25 And I configure the Hoptoad shim
26 And I configure the notifier to use "myapikey" as an API key
27 And I configure my application to require the "hoptoad_notifier" gem
28 And I run "script/generate hoptoad"
29 Then I should receive a Hoptoad notification
30
31 Scenario: Try to install without an api key
32 When I generate a new Rails application
33 And I configure my application to require the "hoptoad_notifier" gem
34 And I run "script/generate hoptoad"
35 Then I should see "Must pass --api-key or create config/initializers/hoptoad.rb"
2be23d7 @jferris Fixed capistrano recipes
jferris authored
36
f784dec @jferris Fixed deploy hooks not working when the gem isn't installed
jferris authored
37 Scenario: Configure and deploy using only installed gem
2be23d7 @jferris Fixed capistrano recipes
jferris authored
38 When I generate a new Rails application
39 And I run "capify ."
40 And I configure the Hoptoad shim
41 And I configure my application to require the "hoptoad_notifier" gem
42 And I run "script/generate hoptoad -k myapikey"
43 And I run "cap -T"
44 Then I should see "deploy:notify_hoptoad"
f784dec @jferris Fixed deploy hooks not working when the gem isn't installed
jferris authored
45
46 Scenario: Configure and deploy using only vendored gem
47 When I generate a new Rails application
48 And I run "capify ."
49 And I configure the Hoptoad shim
50 And I configure my application to require the "hoptoad_notifier" gem
51 And I unpack the "hoptoad_notifier" gem
52 And I run "script/generate hoptoad -k myapikey"
53 And I uninstall the "hoptoad_notifier" gem
54 And I run "cap -T"
55 Then I should see "deploy:notify_hoptoad"
c1da35c LH-591 Notifier generator checks the presence of the hoptoad_notifier pl...
damselem authored
56
57 Scenario: Try to install when the hoptoad_notifier plugin still exists
58 When I generate a new Rails application
59 And I install the "hoptoad_notifier" plugin
60 And I configure the Hoptoad shim
61 And I configure the notifier to use "myapikey" as an API key
62 And I configure my application to require the "hoptoad_notifier" gem
63 And I run "script/generate hoptoad"
64 Then I should see "You must first remove the hoptoad_notifier plugin from the vendor/plugins directory"
65
Something went wrong with that request. Please try again.