Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 85 lines (75 sloc) 3.884 kb
7df97d79 »
2010-01-13 Added a test for the installation process
1 Feature: Install the Gem in a Rails application
2
3 Background:
4 Given I have built and installed the "hoptoad_notifier" gem
5
1f878913 »
2010-01-19 Added integration coverage and fixes for older versions of Rails
6 Scenario: Use the gem without vendoring the gem in a Rails application
7df97d79 »
2010-01-13 Added a test for the installation process
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
022a1a3f »
2010-01-13 Added scenarios for missing api key/configuring by hand
12
ad3d0872 »
2010-01-13 Changed rake tasks to be included instead of copied
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
1f878913 »
2010-01-19 Added integration coverage and fixes for older versions of Rails
17 And I unpack the "hoptoad_notifier" gem
ad3d0872 »
2010-01-13 Changed rake tasks to be included instead of copied
18 And I run "script/generate hoptoad -k myapikey"
1f878913 »
2010-01-19 Added integration coverage and fixes for older versions of Rails
19 And I uninstall the "hoptoad_notifier" gem
20 And I run "rake hoptoad:test"
21 Then I should receive two Hoptoad notifications
ad3d0872 »
2010-01-13 Changed rake tasks to be included instead of copied
22
022a1a3f »
2010-01-13 Added scenarios for missing api key/configuring by hand
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"
2be23d7c »
2010-01-13 Fixed capistrano recipes
36
f784dec1 »
2010-01-20 Fixed deploy hooks not working when the gem isn't installed
37 Scenario: Configure and deploy using only installed gem
2be23d7c »
2010-01-13 Fixed capistrano recipes
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"
f784dec1 »
2010-01-20 Fixed deploy hooks not working when the gem isn't installed
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"
c1da35c4 »
2010-01-25 LH-591 Notifier generator checks the presence of the hoptoad_notifier…
56
0cd71546 »
2010-01-27 Updating the uninstall instructions to use script/plugin remove
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. Please run: script/plugin remove hoptoad_notifier"
6fbbe2be »
2010-01-21 Added integration tests for rescuing
65
66 Scenario: Rescue an exception in a controller
67 When I generate a new Rails application
68 And I configure the Hoptoad shim
69 And I configure my application to require the "hoptoad_notifier" gem
70 And I run "script/generate hoptoad -k myapikey"
71 And I define a response for "TestController#index":
72 """
73 session[:value] = "test"
74 raise RuntimeError, "some message"
75 """
76 And I perform a request to "http://example.com:123/test/index?param=value"
77 Then I should receive the following Hoptoad notification:
78 | component | test |
79 | action | index |
80 | error message | RuntimeError: some message |
81 | error class | RuntimeError |
82 | session | value: test |
83 | parameters | param: value |
84 | url | http://example.com:123/test/index?param=value |
Something went wrong with that request. Please try again.