Skip to content
Newer
Older
100644 109 lines (97 sloc) 4.89 KB
7df97d7 @jferris Added a test for the installation process
jferris authored Jan 13, 2010
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 Jan 19, 2010
6 Scenario: Use the gem without vendoring the gem in a Rails application
7df97d7 @jferris Added a test for the installation process
jferris authored Jan 13, 2010
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
912a441 @jasonm Starting to add features for Rails 3
jasonm authored Mar 12, 2010
10 And I run the hoptoad generator with "-k myapikey"
641d2ca @jferris Got the generator running and a request dispatched to the test endpoint
jferris authored Mar 19, 2010
11 Then the command should have run successfully
12 And I should receive a Hoptoad notification
4f106ff @jferris Fixed reporting of Rails version
jferris authored Jan 21, 2010
13 And I should see the Rails version
022a1a3 @jferris Added scenarios for missing api key/configuring by hand
jferris authored Jan 13, 2010
14
ad3d087 @jferris Changed rake tasks to be included instead of copied
jferris authored Jan 13, 2010
15 Scenario: vendor the gem and uninstall
16 When I generate a new Rails application
17 And I configure the Hoptoad shim
18 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 Jan 19, 2010
19 And I unpack the "hoptoad_notifier" gem
912a441 @jasonm Starting to add features for Rails 3
jasonm authored Mar 12, 2010
20 And I run the hoptoad generator with "-k myapikey"
641d2ca @jferris Got the generator running and a request dispatched to the test endpoint
jferris authored Mar 19, 2010
21 Then the command should have run successfully
22 When I uninstall the "hoptoad_notifier" gem
f488c09 @jferris Support bundler
jferris authored Mar 22, 2010
23 And I install cached gems
1f87891 @jferris Added integration coverage and fixes for older versions of Rails
jferris authored Jan 19, 2010
24 And I run "rake hoptoad:test"
641d2ca @jferris Got the generator running and a request dispatched to the test endpoint
jferris authored Mar 19, 2010
25 Then the command should have run successfully
26 And I should receive two Hoptoad notifications
ad3d087 @jferris Changed rake tasks to be included instead of copied
jferris authored Jan 13, 2010
27
022a1a3 @jferris Added scenarios for missing api key/configuring by hand
jferris authored Jan 13, 2010
28 Scenario: Configure the notifier by hand
29 When I generate a new Rails application
30 And I configure the Hoptoad shim
31 And I configure the notifier to use "myapikey" as an API key
32 And I configure my application to require the "hoptoad_notifier" gem
912a441 @jasonm Starting to add features for Rails 3
jasonm authored Mar 12, 2010
33 And I run the hoptoad generator with ""
022a1a3 @jferris Added scenarios for missing api key/configuring by hand
jferris authored Jan 13, 2010
34 Then I should receive a Hoptoad notification
35
36 Scenario: Try to install without an api key
37 When I generate a new Rails application
38 And I configure my application to require the "hoptoad_notifier" gem
912a441 @jasonm Starting to add features for Rails 3
jasonm authored Mar 12, 2010
39 And I run the hoptoad generator with ""
022a1a3 @jferris Added scenarios for missing api key/configuring by hand
jferris authored Jan 13, 2010
40 Then I should see "Must pass --api-key or create config/initializers/hoptoad.rb"
2be23d7 @jferris Fixed capistrano recipes
jferris authored Jan 13, 2010
41
f784dec @jferris Fixed deploy hooks not working when the gem isn't installed
jferris authored Jan 20, 2010
42 Scenario: Configure and deploy using only installed gem
2be23d7 @jferris Fixed capistrano recipes
jferris authored Jan 13, 2010
43 When I generate a new Rails application
44 And I run "capify ."
45 And I configure the Hoptoad shim
46 And I configure my application to require the "hoptoad_notifier" gem
912a441 @jasonm Starting to add features for Rails 3
jasonm authored Mar 12, 2010
47 And I run the hoptoad generator with "-k myapikey"
2be23d7 @jferris Fixed capistrano recipes
jferris authored Jan 13, 2010
48 And I run "cap -T"
49 Then I should see "deploy:notify_hoptoad"
f784dec @jferris Fixed deploy hooks not working when the gem isn't installed
jferris authored Jan 20, 2010
50
51 Scenario: Configure and deploy using only vendored gem
52 When I generate a new Rails application
53 And I run "capify ."
54 And I configure the Hoptoad shim
55 And I configure my application to require the "hoptoad_notifier" gem
56 And I unpack the "hoptoad_notifier" gem
912a441 @jasonm Starting to add features for Rails 3
jasonm authored Mar 12, 2010
57 And I run the hoptoad generator with "-k myapikey"
f784dec @jferris Fixed deploy hooks not working when the gem isn't installed
jferris authored Jan 20, 2010
58 And I uninstall the "hoptoad_notifier" gem
e6f87a5 @jferris Added a capistrano hook for Rails 3
jferris authored Mar 23, 2010
59 And I install cached gems
f784dec @jferris Fixed deploy hooks not working when the gem isn't installed
jferris authored Jan 20, 2010
60 And I run "cap -T"
61 Then I should see "deploy:notify_hoptoad"
c1da35c LH-591 Notifier generator checks the presence of the hoptoad_notifier…
damselem authored Jan 25, 2010
62
0cd7154 @qrush Updating the uninstall instructions to use script/plugin remove
qrush authored Jan 27, 2010
63 Scenario: Try to install when the hoptoad_notifier plugin still exists
64 When I generate a new Rails application
65 And I install the "hoptoad_notifier" plugin
66 And I configure the Hoptoad shim
67 And I configure the notifier to use "myapikey" as an API key
68 And I configure my application to require the "hoptoad_notifier" gem
912a441 @jasonm Starting to add features for Rails 3
jasonm authored Mar 12, 2010
69 And I run the hoptoad generator with ""
0cd7154 @qrush Updating the uninstall instructions to use script/plugin remove
qrush authored Jan 27, 2010
70 Then I should see "You must first remove the hoptoad_notifier plugin. Please run: script/plugin remove hoptoad_notifier"
6fbbe2b @jferris Added integration tests for rescuing
jferris authored Jan 21, 2010
71
72 Scenario: Rescue an exception in a controller
73 When I generate a new Rails application
74 And I configure the Hoptoad shim
75 And I configure my application to require the "hoptoad_notifier" gem
912a441 @jasonm Starting to add features for Rails 3
jasonm authored Mar 12, 2010
76 And I run the hoptoad generator with "-k myapikey"
6fbbe2b @jferris Added integration tests for rescuing
jferris authored Jan 21, 2010
77 And I define a response for "TestController#index":
78 """
79 session[:value] = "test"
80 raise RuntimeError, "some message"
81 """
1bab4e3 @jferris Extract request info from rack env
jferris authored Mar 23, 2010
82 And I route "/test/index" to "test#index"
6fbbe2b @jferris Added integration tests for rescuing
jferris authored Jan 21, 2010
83 And I perform a request to "http://example.com:123/test/index?param=value"
84 Then I should receive the following Hoptoad notification:
85 | component | test |
86 | action | index |
87 | error message | RuntimeError: some message |
88 | error class | RuntimeError |
89 | session | value: test |
90 | parameters | param: value |
91 | url | http://example.com:123/test/index?param=value |
390df9b @jasonm LH-629 Ensure notifier is not considered a framework gem
jasonm authored Mar 10, 2010
92
93 Scenario: The gem should not be considered a framework gem
94 When I generate a new Rails application
95 And I configure the Hoptoad shim
96 And I configure my application to require the "hoptoad_notifier" gem
912a441 @jasonm Starting to add features for Rails 3
jasonm authored Mar 12, 2010
97 And I run the hoptoad generator with "-k myapikey"
390df9b @jasonm LH-629 Ensure notifier is not considered a framework gem
jasonm authored Mar 10, 2010
98 And I run "rake gems"
99 Then I should see that "hoptoad_notifier" is not considered a framework gem
a010408 don't append capistrano details to config.deploy.rb when target app u…
Dan Lawless authored Mar 12, 2010
100
101 Scenario: The app uses Vlad instead of Capistrano
102 When I generate a new Rails application
103 And I configure the Hoptoad shim
104 And I configure my application to require the "hoptoad_notifier" gem
105 And I run "touch config/deploy.rb"
106 And I run "rm Capfile"
107 And I run "script/generate hoptoad -k myapikey"
108 Then "config/deploy.rb" should not contain text of "generators/hoptoad/templates/capistrano_hook.rb"
Something went wrong with that request. Please try again.