lolcommits 0.5.7 → 0.5.8.pre1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +8 -8
  2. data/.rubocop.yml +1 -0
  3. data/.rubocop_todo.yml +16 -161
  4. data/.travis.yml +11 -4
  5. data/Gemfile +2 -2
  6. data/Rakefile +24 -32
  7. data/bin/lolcommits +62 -125
  8. data/features/bugs.feature +24 -9
  9. data/features/lolcommits.feature +136 -145
  10. data/features/plugins.feature +16 -33
  11. data/features/step_definitions/lolcommits_steps.rb +91 -71
  12. data/features/support/env.rb +18 -48
  13. data/features/support/path_helpers.rb +9 -8
  14. data/lib/lolcommits.rb +3 -10
  15. data/lib/lolcommits/capturer.rb +10 -2
  16. data/lib/lolcommits/capturer/capture_linux.rb +1 -1
  17. data/lib/lolcommits/capturer/capture_linux_animated.rb +12 -13
  18. data/lib/lolcommits/capturer/capture_mac_animated.rb +12 -13
  19. data/lib/lolcommits/cli/fatals.rb +77 -0
  20. data/lib/lolcommits/cli/launcher.rb +29 -0
  21. data/lib/lolcommits/cli/process_runner.rb +48 -0
  22. data/lib/lolcommits/cli/timelapse_gif.rb +45 -0
  23. data/lib/lolcommits/configuration.rb +30 -133
  24. data/lib/lolcommits/git_info.rb +58 -28
  25. data/lib/lolcommits/installation.rb +11 -21
  26. data/lib/lolcommits/platform.rb +134 -0
  27. data/lib/lolcommits/plugin.rb +2 -2
  28. data/lib/lolcommits/plugins/dot_com.rb +15 -15
  29. data/lib/lolcommits/plugins/lol_protonet.rb +68 -0
  30. data/lib/lolcommits/plugins/lol_twitter.rb +12 -15
  31. data/lib/lolcommits/plugins/lol_yammer.rb +4 -6
  32. data/lib/lolcommits/plugins/lolsrv.rb +8 -11
  33. data/lib/lolcommits/plugins/loltext.rb +7 -7
  34. data/lib/lolcommits/plugins/tranzlate.rb +70 -70
  35. data/lib/lolcommits/plugins/uploldz.rb +8 -8
  36. data/lib/lolcommits/runner.rb +36 -35
  37. data/lib/lolcommits/version.rb +1 -1
  38. data/lolcommits.gemspec +11 -10
  39. data/test/lolcommits_test.rb +35 -0
  40. data/test/plugins_test.rb +52 -0
  41. metadata +41 -20
  42. data/test/test_lolcommits.rb +0 -78
@@ -3,11 +3,14 @@ Feature: Bug regression testing
3
3
  I want to ensure fixed bugs stay fixed
4
4
  So that I don't have to fix them again!
5
5
 
6
+ Background:
7
+ Given a mocked home directory
8
+
6
9
  #
7
10
  # issue #58, https://github.com/mroth/lolcommits/issues/58
8
11
  #
9
12
  Scenario: handle git repos with spaces in directory name
10
- Given I am in a git repository named "test lolol" with lolcommits enabled
13
+ Given I am in a git repo named "test lolol" with lolcommits enabled
11
14
  And I successfully run `git commit --allow-empty -m 'can haz commit'`
12
15
  Then the output should contain "*** Preserving this moment in history."
13
16
  And a directory named "../.lolcommits/test-lolol" should exist
@@ -17,7 +20,7 @@ Feature: Bug regression testing
17
20
  #
18
21
  @fake-interactive-rebase @slow_process @unstable
19
22
  Scenario: Don't trigger capture during a git rebase
20
- Given I am in a git repository named "yuh8history" with lolcommits enabled
23
+ Given I am in a git repo named "yuh8history" with lolcommits enabled
21
24
  And I do 6 git commits
22
25
  When I successfully run `git rebase -i HEAD~5`
23
26
  # Then there should be 4 commit entries in the git log
@@ -28,31 +31,43 @@ Feature: Bug regression testing
28
31
  #
29
32
  Scenario: don't warn about system_timer (on MRI 1.8.7)
30
33
  When I successfully run `lolcommits`
31
- Then the output should not contain "Faraday: you may want to install system_timer for reliable timeouts"
34
+ Then the output should not contain:
35
+ """
36
+ Faraday: you may want to install system_timer for reliable timeouts
37
+ """
32
38
 
33
39
  #
34
40
  # issue #81, https://github.com/mroth/lolcommits/issues/81
35
41
  #
36
- Scenario: don't want to see initialized constant warning from Faraday on CLI (on MRI 1.8.7)
42
+ Scenario: don't want initialized constant warning from Faraday (MRI 1.8.7)
37
43
  When I successfully run `lolcommits`
38
- Then the output should not contain "warning: already initialized constant DEFAULT_BOUNDARY"
39
-
44
+ Then the output should not contain:
45
+ """
46
+ warning: already initialized constant DEFAULT_BOUNDARY
47
+ """
48
+
40
49
  #
41
50
  # issue #87, https://github.com/mroth/lolcommits/issues/87
42
51
  #
43
52
  @fake-no-imagemagick
44
53
  Scenario: gracefully fail when imagemagick is not installed
45
54
  When I run `lolcommits`
46
- Then the output should contain "ImageMagick does not appear to be properly installed"
55
+ Then the output should contain:
56
+ """
57
+ ImageMagick does not appear to be properly installed
58
+ """
47
59
  And the exit status should be 1
48
60
 
49
61
  #
50
62
  # issue #50, https://github.com/mroth/lolcommits/issues/50
51
63
  #
52
64
  Scenario: catch upstream bug with ruby-git and color=always
53
- Given I am in a git repository named "whatev" with lolcommits enabled
65
+ Given I am in a git repo named "whatev" with lolcommits enabled
54
66
  And I successfully run `git config color.ui always`
55
67
  When I run `lolcommits`
56
- Then the output should contain "Due to a bug in the ruby-git library, git config for color.ui cannot be set to 'always'."
68
+ Then the output should contain:
69
+ """
70
+ Due to a bug in the ruby-git library, git config for color.ui cannot be set to 'always'.
71
+ """
57
72
  And the output should contain "Try setting it to 'auto' instead!"
58
73
  And the exit status should be 1
@@ -1,5 +1,8 @@
1
1
  Feature: Basic UI functionality
2
2
 
3
+ Background:
4
+ Given a mocked home directory
5
+
3
6
  Scenario: App just runs
4
7
  When I get help for "lolcommits"
5
8
  Then the exit status should be 0
@@ -9,161 +12,134 @@ Feature: Basic UI functionality
9
12
  Given I am using a "Mac" platform
10
13
  When I get help for "lolcommits"
11
14
  Then the following options should be documented:
12
- |--animate|which is optional|
13
- |-a |which is optional|
15
+ | --animate | which is optional |
16
+ | -a | which is optional |
14
17
 
15
18
  Scenario: Help should not show the animate option on a Windows plaftorm
16
19
  Given I am using a "Windows" platform
17
20
  When I get help for "lolcommits"
18
21
  Then the output should not match /\-a\, \-\-animate\=SECONDS/
19
22
 
20
- Scenario: Enable in a naked git repository
21
- Given a git repository named "loltest" with no "post-commit" hook
22
- When I cd to "loltest"
23
- And I successfully run `lolcommits --enable`
23
+ Scenario: Enable in a naked git repo
24
+ Given I am in a git repo
25
+ When I successfully run `lolcommits --enable`
24
26
  Then the output should contain "installed lolcommit hook to:"
25
- And the output should contain "(to remove later, you can use: lolcommits --disable)"
26
- And a file named ".git/hooks/post-commit" should exist
27
- And the file ".git/hooks/post-commit" should contain "lolcommits --capture"
27
+ And the lolcommits post-commit hook should be properly installed
28
28
  And the exit status should be 0
29
29
 
30
- Scenario: Enable in a git repository that already has a post-commit hook
31
- Given a git repository named "loltest" with a "post-commit" hook
32
- And the "loltest" repository "post-commit" hook has content "#!/bin/sh\n\n/my/own/script"
33
- When I cd to "loltest"
34
- And I successfully run `lolcommits --enable`
30
+ Scenario: Enable in a git repo that already has a post-commit hook
31
+ Given I am in a git repo
32
+ And a post-commit hook with "#!/bin/sh\n\n/my/own/script"
33
+ When I successfully run `lolcommits --enable`
35
34
  Then the output should contain "installed lolcommit hook to:"
36
- And the output should contain "(to remove later, you can use: lolcommits --disable)"
37
- And a file named ".git/hooks/post-commit" should exist
38
- And the file ".git/hooks/post-commit" should contain "#!/bin/sh"
39
- And the file ".git/hooks/post-commit" should contain "/my/own/script"
40
- And the file ".git/hooks/post-commit" should contain "lolcommits --capture"
35
+ And the lolcommits post-commit hook should be properly installed
36
+ And the post-commit hook should contain "#!/bin/sh"
37
+ And the post-commit hook should contain "/my/own/script"
41
38
  And the exit status should be 0
42
39
 
43
- Scenario: Enable in a git repository that already has post-commit hook with a bad shebang
44
- Given a git repository named "loltest" with a "post-commit" hook
45
- And the "loltest" repository "post-commit" hook has content "#!/bin/ruby"
46
- When I cd to "loltest"
40
+ Scenario: Enable in a git repo that has post-commit hook with a bad shebang
41
+ Given I am in a git repo
42
+ And a post-commit hook with "#!/bin/ruby"
47
43
  And I run `lolcommits --enable`
48
- Then the output should contain "doesn't start with a good shebang"
49
- And the file ".git/hooks/post-commit" should not contain "lolcommits --capture"
44
+ Then the output should contain "doesn't start with a good shebang"
45
+ And the post-commit hook should not contain "lolcommits --capture"
50
46
  And the exit status should be 1
51
47
 
52
- Scenario: Enable in a git repository passing capture arguments
53
- Given a git repository named "loltest" with no "post-commit" hook
54
- When I cd to "loltest"
55
- And I successfully run `lolcommits --enable -w 5 --fork`
56
- Then the output should contain "installed lolcommit hook to:"
57
- And the output should contain "(to remove later, you can use: lolcommits --disable)"
58
- And a file named ".git/hooks/post-commit" should exist
59
- And the file ".git/hooks/post-commit" should contain "lolcommits --capture -w 5 --fork"
60
- And the exit status should be 0
48
+ Scenario: Enable in a git repo passing capture arguments
49
+ Given I am in a git repo
50
+ When I successfully run `lolcommits --enable -w 5 --fork`
51
+ Then the post-commit hook should contain "lolcommits --capture -w 5 --fork"
52
+ And the exit status should be 0
61
53
 
62
- Scenario: Disable in a enabled git repository
63
- Given I am in a git repository named "lolenabled" with lolcommits enabled
54
+ Scenario: Disable in a enabled git repo
55
+ Given I am in a git repo with lolcommits enabled
64
56
  When I successfully run `lolcommits --disable`
65
57
  Then the output should contain "uninstalled"
66
- And a file named ".git/hooks/post-commit" should exist
67
- And the file ".git/hooks/post-commit" should not contain "lolcommits --capture"
68
- And the exit status should be 0
58
+ And a file named ".git/hooks/post-commit" should exist
59
+ And the exit status should be 0
69
60
 
70
61
  Scenario: Trying to enable while not in a git repo fails
71
62
  Given I am in a directory named "svnrulez"
72
63
  When I run `lolcommits --enable`
73
- Then the output should contain "You don't appear to be in the base directory of a git project."
74
- And the exit status should be 1
64
+ Then the output should contain:
65
+ """
66
+ You don't appear to be in the base directory of a git project.
67
+ """
68
+ And the exit status should be 1
75
69
 
76
70
  Scenario: Capture doesnt break in forked mode
77
- Given I am in a git repository named "testforkcapture"
71
+ Given I am in a git repo named "forked"
78
72
  And I do a git commit
79
73
  When I successfully run `lolcommits --capture --fork`
80
- Then there should be exactly 1 pid in "../.lolcommits/testforkcapture"
81
- When I wait for the child process to exit in "testforkcapture"
82
- Then a directory named "../.lolcommits/testforkcapture" should exist
83
- And a file named "../.lolcommits/testforkcapture/tmp_snapshot.jpg" should not exist
84
- And there should be exactly 1 jpg in "../.lolcommits/testforkcapture"
74
+ Then there should be exactly 1 pid in "~/.lolcommits/forked"
75
+ When I wait for the child process to exit in "forked"
76
+ Then a directory named "~/.lolcommits/forked" should exist
77
+ And a file named "~/.lolcommits/forked/tmp_snapshot.jpg" should not exist
78
+ And there should be exactly 1 jpg in "~/.lolcommits/forked"
85
79
 
86
80
  Scenario: Commiting in an enabled repo triggers successful capture
87
- Given I am in a git repository named "testcapture" with lolcommits enabled
81
+ Given I am in a git repo named "myrepo" with lolcommits enabled
88
82
  When I do a git commit
89
83
  Then the output should contain "*** Preserving this moment in history."
90
- And a directory named "../.lolcommits/testcapture" should exist
91
- And a file named "../.lolcommits/testcapture/tmp_snapshot.jpg" should not exist
92
- And there should be exactly 1 jpg in "../.lolcommits/testcapture"
84
+ And a directory named "~/.lolcommits/myrepo" should exist
85
+ And a file named "~/.lolcommits/myrepo/tmp_snapshot.jpg" should not exist
86
+ And there should be exactly 1 jpg in "~/.lolcommits/myrepo"
93
87
 
94
- Scenario: Commiting in an enabled repo subdirectory triggers successful capture of parent repo
95
- Given I am in a git repository named "testcapture" with lolcommits enabled
88
+ Scenario: Commiting in enabled repo subdirectory triggers successful capture
89
+ Given I am in a git repo named "testcapture" with lolcommits enabled
96
90
  And a directory named "subdir"
97
91
  And an empty file named "subdir/FOOBAR"
98
92
  When I cd to "subdir/"
99
93
  And I do a git commit
100
94
  Then the output should contain "*** Preserving this moment in history."
101
- And a directory named "../../.lolcommits/testcapture" should exist
102
- And a directory named "../../.lolcommits/subdir" should not exist
103
- And there should be exactly 1 jpg in "../../.lolcommits/testcapture"
95
+ And a directory named "~/.lolcommits/testcapture" should exist
96
+ And a directory named "~/.lolcommits/subdir" should not exist
97
+ And there should be exactly 1 jpg in "~/.lolcommits/testcapture"
104
98
 
105
99
  Scenario: Stealth mode does not alert the user
106
- Given I am in a git repository named "teststealth"
100
+ Given I am in a git repo named "teststealth"
107
101
  And I do a git commit
108
102
  When I run `lolcommits --stealth --capture`
109
103
  Then the output should not contain "*** Preserving this moment in history."
110
- And there should be exactly 1 jpg in "../.lolcommits/teststealth"
104
+ And there should be exactly 1 jpg in "~/.lolcommits/teststealth"
111
105
 
112
- Scenario: Commiting in stealth mode triggers successful capture without alerting the committer
113
- Given I am in a git repository named "teststealth" with lolcommits enabled
114
- And I have environment variable LOLCOMMITS_STEALTH set to 1
106
+ Scenario: Commiting in stealth mode captures without alerting the committer
107
+ Given I am in a git repo with lolcommits enabled
108
+ And I have environment variable LOLCOMMITS_STEALTH set to 1
115
109
  When I do a git commit
116
110
  Then the output should not contain "*** Preserving this moment in history."
117
- And there should be exactly 1 jpg in "../.lolcommits/teststealth"
111
+ And there should be exactly 1 jpg in its loldir
118
112
 
119
113
  Scenario: Show plugins
120
114
  When I successfully run `lolcommits --plugins`
121
115
  Then the output should contain a list of plugins
122
116
 
123
- #
124
- # a stab at recreating ken's scenarios with native aruba steps, not quite there yet in terms
125
- # of elegance, but its passing so might as well leave in for now.
126
- #
127
- Scenario: Configuring plugin (with native aruba steps)
128
- Given a git repository named "config-test"
129
- When I cd to "config-test"
130
- And I run `lolcommits --config` interactively
131
- When I type "loltext"
132
- When I type "true"
133
- Then the output should contain a list of plugins
134
- And the output should contain "Name of plugin to configure:"
135
- Then the output should contain "enabled:"
117
+ Scenario: Configuring plugin
118
+ Given I am in a git repo named "config-test"
119
+ When I run `lolcommits --config` interactively
120
+ And I wait for output to contain "Name of plugin to configure:"
121
+ Then I type "loltext"
122
+ And I wait for output to contain "enabled:"
123
+ Then I type "true"
136
124
  Then the output should contain "Successfully configured plugin: loltext"
137
- And a file named "../.lolcommits/config-test/config.yml" should exist
125
+ And the output should contain a list of plugins
126
+ And a file named "~/.lolcommits/config-test/config.yml" should exist
138
127
  When I successfully run `lolcommits --show-config`
139
- Then the output should contain "loltext:"
140
- And the output should contain "enabled: true"
141
-
142
- Scenario: Configuring Plugin
143
- Given a git repository named "config-test"
144
- When I cd to "config-test"
145
- And I run `lolcommits --config` and wait for output
146
- When I enter "loltext" for "Name of plugin to configure"
147
- And I enter "true" for "enabled"
148
- Then I should be presented "Successfully configured plugin: loltext"
149
- And a file named "../.lolcommits/config-test/config.yml" should exist
150
- When I successfully run `lolcommits --show-config`
151
- Then the output should contain "loltext:"
152
- And the output should contain "enabled: true"
153
-
154
- Scenario: Configuring Plugin In Test Mode
155
- Given a git repository named "testmode-config-test"
156
- When I cd to "testmode-config-test"
157
- And I run `lolcommits --config --test` and wait for output
158
- And I enter "loltext" for "Name of plugin to configure"
159
- And I enter "true" for "enabled"
160
- Then I should be presented "Successfully configured plugin: loltext"
161
- And a file named "../.lolcommits/test/config.yml" should exist
128
+ Then the output should match /loltext:\s+enabled: true/
129
+
130
+ Scenario: Configuring plugin in test mode affects test loldir not repo loldir
131
+ Given I am in a git repo named "testmode-config-test"
132
+ When I run `lolcommits --config --test` interactively
133
+ And I wait for output to contain "Name of plugin to configure:"
134
+ Then I type "loltext"
135
+ And I wait for output to contain "enabled:"
136
+ Then I type "true"
137
+ Then the output should contain "Successfully configured plugin: loltext"
138
+ And a file named "~/.lolcommits/test/config.yml" should exist
162
139
  When I successfully run `lolcommits --test --show-config`
163
- Then the output should contain "loltext:"
164
- And the output should contain "enabled: true"
140
+ Then the output should match /loltext:\s+enabled: true/
165
141
 
166
- Scenario: test capture should work regardless of whether in a git repository
142
+ Scenario: test capture should work regardless of whether in a git repo
167
143
  Given I am in a directory named "nothingtoseehere"
168
144
  When I run `lolcommits --test --capture`
169
145
  Then the output should contain "*** Capturing in test mode."
@@ -171,100 +147,115 @@ Feature: Basic UI functionality
171
147
  And the exit status should be 0
172
148
 
173
149
  Scenario: test capture should store in its own test directory
174
- Given I am in a git repository named "randomgitrepo" with lolcommits enabled
150
+ Given I am in a git repo named "randomgitrepo" with lolcommits enabled
175
151
  When I successfully run `lolcommits --test --capture`
176
- Then a directory named "../.lolcommits/test" should exist
177
- And a directory named "../.lolcommits/randomgitrepo" should not exist
152
+ Then a directory named "~/.lolcommits/test" should exist
153
+ And a directory named "~/.lolcommits/randomgitrepo" should not exist
178
154
 
179
155
  Scenario: last command should work properly when in a lolrepo
180
- Given a git repository named "randomgitrepo"
181
- And a loldir named "randomgitrepo" with 2 lolimages
182
- And I cd to "randomgitrepo"
156
+ Given I am in a git repo
157
+ And its loldir has 2 lolimages
183
158
  When I run `lolcommits --last`
184
159
  Then the exit status should be 0
185
160
 
186
161
  Scenario: last command should work properly when in a lolrepo subdirectory
187
- Given I am in a git repository named "randomgitrepo"
188
- And a loldir named "randomgitrepo" with 2 lolimages
162
+ Given I am in a git repo
163
+ And its loldir has 2 lolimages
189
164
  And a directory named "randomdir"
190
165
  And I cd to "randomdir"
191
166
  When I run `lolcommits --last`
192
- Then the output should not contain "Can't do that since we're not in a valid git repository!"
193
- And the exit status should be 0
167
+ Then the output should not contain:
168
+ """
169
+ Can't do that since we're not in a valid git repository!
170
+ """
171
+ And the exit status should be 0
194
172
 
195
173
  @in-tempdir
196
174
  Scenario: last command should fail gracefully if not in a lolrepo
197
175
  Given I am in a directory named "gitsuxcvs4eva"
198
176
  When I run `lolcommits --last`
199
- Then the output should contain "Can't do that since we're not in a valid git repository!"
177
+ Then the output should contain:
178
+ """
179
+ Can't do that since we're not in a valid git repository!
180
+ """
200
181
  And the exit status should be 1
201
182
 
202
183
  Scenario: last command should fail gracefully if zero lolimages in lolrepo
203
- Given a git repository named "randomgitrepo"
204
- And a loldir named "randomgitrepo" with 0 lolimages
205
- And I cd to "randomgitrepo"
184
+ Given I am in a git repo
185
+ And its loldir has 0 lolimages
206
186
  When I run `lolcommits --last`
207
- Then the output should contain "No lolcommits have been captured for this repository yet."
187
+ Then the output should contain:
188
+ """
189
+ No lolcommits have been captured for this repository yet.
190
+ """
208
191
  Then the exit status should be 1
209
192
 
210
193
  Scenario: browse command should work properly when in a lolrepo
211
- Given a git repository named "randomgitrepo"
212
- And a loldir named "randomgitrepo" with 2 lolimages
213
- And I cd to "randomgitrepo"
194
+ Given I am in a git repo
195
+ And its loldir has 2 lolimages
214
196
  When I run `lolcommits --browse`
215
197
  Then the exit status should be 0
216
198
 
217
199
  Scenario: browse command should work properly when in a lolrepo subdirectory
218
- Given I am in a git repository named "randomgitrepo"
219
- And a loldir named "randomgitrepo" with 2 lolimages
220
- And a directory named "randomdir"
221
- And I cd to "randomdir"
200
+ Given I am in a git repo
201
+ And its loldir has 2 lolimages
202
+ And a directory named "subdir"
203
+ And I cd to "subdir"
222
204
  When I run `lolcommits --browse`
223
- Then the output should not contain "Can't do that since we're not in a valid git repository!"
224
- And the exit status should be 0
205
+ Then the output should not contain:
206
+ """
207
+ Can't do that since we're not in a valid git repository!
208
+ """
209
+ And the exit status should be 0
225
210
 
226
211
  @in-tempdir
227
212
  Scenario: browse command should fail gracefully when not in a lolrepo
228
213
  Given I am in a directory named "gitsuxcvs4eva"
229
214
  When I run `lolcommits --browse`
230
- Then the output should contain "Can't do that since we're not in a valid git repository!"
231
- And the exit status should be 1
215
+ Then the output should contain:
216
+ """
217
+ Can't do that since we're not in a valid git repository!
218
+ """
219
+ And the exit status should be 1
232
220
 
233
221
  Scenario: handle commit messages with quotation marks
234
- Given I am in a git repository named "shellz" with lolcommits enabled
235
- When I successfully run `git commit --allow-empty -m 'i hate \"air quotes\" dont you'`
222
+ Given I am in a git repo with lolcommits enabled
223
+ When I successfully run `git commit --allow-empty -m 'no "air quotes" bae'`
236
224
  Then the exit status should be 0
237
- And there should be exactly 1 jpg in "../.lolcommits/shellz"
225
+ And there should be exactly 1 jpg in its loldir
238
226
 
239
227
  Scenario: generate gif should store in its own archive directory
240
- Given I am in a git repository named "randomgitrepo" with lolcommits enabled
241
- And a loldir named "randomgitrepo" with 2 lolimages
228
+ Given I am in a git repo named "giffy" with lolcommits enabled
229
+ And a loldir named "giffy" with 2 lolimages
242
230
  When I successfully run `lolcommits -g`
243
231
  Then the output should contain "Generating animated gif."
244
- And a directory named "../.lolcommits/randomgitrepo/archive" should exist
245
- And a file named "../.lolcommits/randomgitrepo/archive/archive.gif" should exist
232
+ And a directory named "~/.lolcommits/giffy/archive" should exist
233
+ And a file named "~/.lolcommits/giffy/archive/archive.gif" should exist
246
234
 
247
235
  Scenario: generate gif with argument 'today'
248
- Given I am in a git repository named "randomgitrepo" with lolcommits enabled
249
- And a loldir named "randomgitrepo" with 2 lolimages
236
+ Given I am in a git repo named "sunday" with lolcommits enabled
237
+ And a loldir named "sunday" with 2 lolimages
250
238
  When I successfully run `lolcommits -g today`
251
- And there should be exactly 1 gif in "../.lolcommits/randomgitrepo/archive"
239
+ Then there should be exactly 1 gif in "~/.lolcommits/sunday/archive"
252
240
 
253
241
  @mac-only
254
242
  Scenario: should generate an animated gif on the Mac platform
255
- Given I am in a git repository named "testanimatedcapture"
243
+ Given I am in a git repo named "animate"
256
244
  And I do a git commit
257
245
  And I am using a "Mac" platform
258
246
  When I run `lolcommits --capture --animate=1`
259
247
  Then the output should contain "*** Preserving this moment in history."
260
- And a directory named "../.lolcommits/testanimatedcapture" should exist
261
- And a file named "../.lolcommits/testanimatedcapture/tmp_video.mov" should not exist
262
- And a directory named "../.lolcommits/testanimatedcapture/tmp_frames" should not exist
263
- And there should be exactly 1 gif in "../.lolcommits/testanimatedcapture"
248
+ And a directory named "~/.lolcommits/animate" should exist
249
+ And a file named "~/.lolcommits/animate/tmp_video.mov" should not exist
250
+ And a directory named "~/.lolcommits/animate/tmp_frames" should not exist
251
+ And there should be exactly 1 gif in "~/.lolcommits/animate"
264
252
 
265
253
  @fake-no-ffmpeg
266
- Scenario: gracefully fail when ffmpeg is not installed and animate option is used
254
+ Scenario: gracefully fail when ffmpeg not installed and --animate is used
267
255
  Given I am using a "Mac" platform
268
256
  When I run `lolcommits --animate=3`
269
- Then the output should contain "ffmpeg does not appear to be properly installed"
257
+ Then the output should contain:
258
+ """
259
+ ffmpeg does not appear to be properly installed
260
+ """
270
261
  And the exit status should be 1