This repository has been archived by the owner on Nov 11, 2017. It is now read-only.
/
rails.feature
65 lines (56 loc) · 2.74 KB
/
rails.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
Feature: Install the Gem in a Rails application
Background:
Given I have built and installed the "hoptoad_notifier" gem
Scenario: Use the gem without vendoring the gem in a Rails application
When I generate a new Rails application
And I configure the Hoptoad shim
And I configure my application to require the "hoptoad_notifier" gem
And I run "script/generate hoptoad -k myapikey"
Then I should receive a Hoptoad notification
Scenario: vendor the gem and uninstall
When I generate a new Rails application
And I configure the Hoptoad shim
And I configure my application to require the "hoptoad_notifier" gem
And I unpack the "hoptoad_notifier" gem
And I run "script/generate hoptoad -k myapikey"
And I uninstall the "hoptoad_notifier" gem
And I run "rake hoptoad:test"
Then I should receive two Hoptoad notifications
Scenario: Configure the notifier by hand
When I generate a new Rails application
And I configure the Hoptoad shim
And I configure the notifier to use "myapikey" as an API key
And I configure my application to require the "hoptoad_notifier" gem
And I run "script/generate hoptoad"
Then I should receive a Hoptoad notification
Scenario: Try to install without an api key
When I generate a new Rails application
And I configure my application to require the "hoptoad_notifier" gem
And I run "script/generate hoptoad"
Then I should see "Must pass --api-key or create config/initializers/hoptoad.rb"
Scenario: Configure and deploy using only installed gem
When I generate a new Rails application
And I run "capify ."
And I configure the Hoptoad shim
And I configure my application to require the "hoptoad_notifier" gem
And I run "script/generate hoptoad -k myapikey"
And I run "cap -T"
Then I should see "deploy:notify_hoptoad"
Scenario: Configure and deploy using only vendored gem
When I generate a new Rails application
And I run "capify ."
And I configure the Hoptoad shim
And I configure my application to require the "hoptoad_notifier" gem
And I unpack the "hoptoad_notifier" gem
And I run "script/generate hoptoad -k myapikey"
And I uninstall the "hoptoad_notifier" gem
And I run "cap -T"
Then I should see "deploy:notify_hoptoad"
Scenario: Try to install when the hoptoad_notifier plugin still exists
When I generate a new Rails application
And I install the "hoptoad_notifier" plugin
And I configure the Hoptoad shim
And I configure the notifier to use "myapikey" as an API key
And I configure my application to require the "hoptoad_notifier" gem
And I run "script/generate hoptoad"
Then I should see "You must first remove the hoptoad_notifier plugin from the vendor/plugins directory"