jeweler 2.1.1 → 2.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.semver +1 -1
- data/.travis.yml +5 -1
- data/ChangeLog.markdown +4 -0
- data/Gemfile +23 -23
- data/Gemfile.lock +142 -0
- data/Gemfile.orig +54 -0
- data/README.markdown +3 -0
- data/Rakefile +13 -14
- data/Rakefile.orig +88 -0
- data/features/generator/test.feature +2 -2
- data/features/step_definitions/debug_steps.rb +0 -1
- data/features/step_definitions/filesystem_steps.rb +2 -3
- data/features/step_definitions/generator_steps.rb +44 -64
- data/features/step_definitions/task_steps.rb +1 -2
- data/features/support/env.rb +21 -7
- data/jeweler.gemspec +11 -6
- data/jeweler.gemspec.orig +464 -0
- data/lib/jeweler.rb +18 -19
- data/lib/jeweler/commands/build_gem.rb +2 -2
- data/lib/jeweler/commands/check_dependencies.rb +3 -3
- data/lib/jeweler/commands/install_gem.rb +1 -1
- data/lib/jeweler/commands/release_gemspec.rb +8 -10
- data/lib/jeweler/commands/release_to_git.rb +9 -5
- data/lib/jeweler/commands/validate_gemspec.rb +5 -7
- data/lib/jeweler/commands/version/base.rb +8 -13
- data/lib/jeweler/commands/version/bump_major.rb +1 -3
- data/lib/jeweler/commands/version/bump_minor.rb +1 -2
- data/lib/jeweler/commands/version/bump_patch.rb +1 -4
- data/lib/jeweler/commands/write_gemspec.rb +4 -3
- data/lib/jeweler/gemspec_helper.rb +15 -15
- data/lib/jeweler/gemspec_helper.rb.orig +91 -0
- data/lib/jeweler/generator.rb +39 -41
- data/lib/jeweler/generator/application.rb +5 -7
- data/lib/jeweler/generator/bacon_mixin.rb +2 -4
- data/lib/jeweler/generator/github_mixin.rb +1 -3
- data/lib/jeweler/generator/micronaut_mixin.rb +3 -3
- data/lib/jeweler/generator/minitest_mixin.rb +2 -3
- data/lib/jeweler/generator/options.rb +15 -19
- data/lib/jeweler/generator/rdoc_mixin.rb +1 -1
- data/lib/jeweler/generator/riot_mixin.rb +2 -3
- data/lib/jeweler/generator/rspec_mixin.rb +2 -3
- data/lib/jeweler/generator/shindo_mixin.rb +2 -3
- data/lib/jeweler/generator/shoulda_mixin.rb +2 -3
- data/lib/jeweler/generator/testspec_mixin.rb +2 -3
- data/lib/jeweler/generator/testunit_mixin.rb +1 -3
- data/lib/jeweler/generator/yard_mixin.rb +3 -4
- data/lib/jeweler/rubyforge_tasks.rb +13 -13
- data/lib/jeweler/rubygems_dot_org_tasks.rb +3 -3
- data/lib/jeweler/rubygems_tasks.rb +3 -3
- data/lib/jeweler/specification.rb +22 -11
- data/lib/jeweler/tasks.rb +57 -57
- data/lib/jeweler/templates/bacon/flunking.rb +3 -3
- data/lib/jeweler/templates/micronaut/flunking.rb +3 -3
- data/lib/jeweler/templates/minitest/flunking.rb +1 -1
- data/lib/jeweler/templates/minitest/helper.rb +3 -3
- data/lib/jeweler/templates/riot/flunking.rb +1 -1
- data/lib/jeweler/templates/rspec/flunking.rb +3 -3
- data/lib/jeweler/templates/shindo/flunking.rb +3 -3
- data/lib/jeweler/templates/testspec/flunking.rb +3 -3
- data/lib/jeweler/version_helper.rb +18 -15
- data/test/fixtures/bar/lib/foo_the_ultimate_lib.rb +1 -1
- data/test/fixtures/existing-project-with-version-constant/Rakefile +18 -20
- data/test/fixtures/existing-project-with-version-constant/existing-project-with-version.gemspec +15 -17
- data/test/fixtures/existing-project-with-version-constant/test/existing_project_with_version_test.rb +2 -2
- data/test/fixtures/existing-project-with-version-plaintext/Rakefile +17 -19
- data/test/fixtures/existing-project-with-version-plaintext/existing-project-with-version.gemspec +15 -17
- data/test/fixtures/existing-project-with-version-plaintext/test/existing_project_with_version_test.rb +2 -2
- data/test/fixtures/existing-project-with-version-yaml/Rakefile +17 -19
- data/test/fixtures/existing-project-with-version-yaml/existing-project-with-version.gemspec +15 -17
- data/test/fixtures/existing-project-with-version-yaml/test/existing_project_with_version_test.rb +2 -2
- data/test/jeweler/commands/test_build_gem.rb +25 -28
- data/test/jeweler/commands/test_install_gem.rb +7 -7
- data/test/jeweler/commands/test_release_to_gemcutter.rb +6 -7
- data/test/jeweler/commands/test_release_to_git.rb +52 -57
- data/test/jeweler/commands/test_release_to_github.rb +112 -119
- data/test/jeweler/commands/test_validate_gemspec.rb +4 -6
- data/test/jeweler/commands/test_write_gemspec.rb +21 -24
- data/test/jeweler/commands/version/test_base.rb +9 -10
- data/test/jeweler/commands/version/test_bump_major.rb +1 -5
- data/test/jeweler/commands/version/test_bump_minor.rb +1 -2
- data/test/jeweler/commands/version/test_bump_patch.rb +1 -3
- data/test/jeweler/commands/version/test_write.rb +1 -3
- data/test/jeweler/generator/test_application.rb +22 -26
- data/test/jeweler/generator/test_options.rb +26 -27
- data/test/jeweler/test_gemspec_helper.rb +7 -7
- data/test/jeweler/test_generator.rb +31 -32
- data/test/jeweler/test_generator_initialization.rb +40 -43
- data/test/jeweler/test_generator_mixins.rb +6 -7
- data/test/jeweler/test_specification.rb +36 -43
- data/test/jeweler/test_tasks.rb +2 -3
- data/test/jeweler/test_version_helper.rb +33 -35
- data/test/shoulda_macros/jeweler_macros.rb +5 -5
- data/test/test_helper.rb +23 -25
- data/test/test_jeweler.rb +22 -25
- metadata +11 -6
@@ -4,9 +4,8 @@ require 'pathname'
|
|
4
4
|
class Jeweler
|
5
5
|
module Commands
|
6
6
|
class TestReleaseGemspec < Test::Unit::TestCase
|
7
|
-
|
8
|
-
|
9
|
-
context "happily" do
|
7
|
+
rubyforge_command_context 'running' do
|
8
|
+
context 'happily' do
|
10
9
|
setup do
|
11
10
|
stub(@command).clean_staging_area? { true }
|
12
11
|
|
@@ -24,25 +23,24 @@ class Jeweler
|
|
24
23
|
@command.run
|
25
24
|
end
|
26
25
|
|
27
|
-
should
|
28
|
-
assert_received(@repo) {|repo| repo.checkout('master') }
|
26
|
+
should 'checkout master' do
|
27
|
+
assert_received(@repo) { |repo| repo.checkout('master') }
|
29
28
|
end
|
30
29
|
|
31
|
-
should
|
32
|
-
assert_received(@command
|
30
|
+
should 'regenerate gemspec' do
|
31
|
+
assert_received(@command, &:regenerate_gemspec!)
|
33
32
|
end
|
34
33
|
|
35
|
-
should
|
36
|
-
assert_received(@command
|
34
|
+
should 'commit gemspec' do
|
35
|
+
assert_received(@command, &:commit_gemspec!)
|
37
36
|
end
|
38
37
|
|
39
|
-
should
|
40
|
-
assert_received(@repo) {|repo| repo.push('origin', 'master:master') }
|
38
|
+
should 'push' do
|
39
|
+
assert_received(@repo) { |repo| repo.push('origin', 'master:master') }
|
41
40
|
end
|
42
|
-
|
43
41
|
end
|
44
42
|
|
45
|
-
context
|
43
|
+
context 'happily with different remote, local branch and remote branch' do
|
46
44
|
setup do
|
47
45
|
stub(@command).clean_staging_area? { true }
|
48
46
|
|
@@ -57,28 +55,27 @@ class Jeweler
|
|
57
55
|
|
58
56
|
stub(@command).release_not_tagged? { true }
|
59
57
|
|
60
|
-
@command.run(
|
58
|
+
@command.run(remote: 'upstream', local_branch: 'branch', remote_branch: 'remote_branch')
|
61
59
|
end
|
62
60
|
|
63
|
-
should
|
64
|
-
assert_received(@repo) {|repo| repo.checkout('branch') }
|
61
|
+
should 'checkout local branch' do
|
62
|
+
assert_received(@repo) { |repo| repo.checkout('branch') }
|
65
63
|
end
|
66
64
|
|
67
|
-
should
|
68
|
-
assert_received(@command
|
65
|
+
should 'regenerate gemspec' do
|
66
|
+
assert_received(@command, &:regenerate_gemspec!)
|
69
67
|
end
|
70
68
|
|
71
|
-
should
|
72
|
-
assert_received(@command
|
69
|
+
should 'commit gemspec' do
|
70
|
+
assert_received(@command, &:commit_gemspec!)
|
73
71
|
end
|
74
72
|
|
75
|
-
should
|
76
|
-
assert_received(@repo) {|repo| repo.push('upstream', 'branch:remote_branch') }
|
73
|
+
should 'push' do
|
74
|
+
assert_received(@repo) { |repo| repo.push('upstream', 'branch:remote_branch') }
|
77
75
|
end
|
78
|
-
|
79
76
|
end
|
80
77
|
|
81
|
-
context
|
78
|
+
context 'happily with different branch' do
|
82
79
|
setup do
|
83
80
|
stub(@command).clean_staging_area? { true }
|
84
81
|
|
@@ -93,45 +90,49 @@ class Jeweler
|
|
93
90
|
|
94
91
|
stub(@command).release_not_tagged? { true }
|
95
92
|
|
96
|
-
@command.run(
|
93
|
+
@command.run(branch: 'v3')
|
97
94
|
end
|
98
95
|
|
99
|
-
should
|
100
|
-
assert_received(@repo) {|repo| repo.checkout('v3') }
|
96
|
+
should 'checkout local branch' do
|
97
|
+
assert_received(@repo) { |repo| repo.checkout('v3') }
|
101
98
|
end
|
102
99
|
|
103
|
-
should
|
104
|
-
assert_received(@command
|
100
|
+
should 'regenerate gemspec' do
|
101
|
+
assert_received(@command, &:regenerate_gemspec!)
|
105
102
|
end
|
106
103
|
|
107
|
-
should
|
108
|
-
assert_received(@command
|
104
|
+
should 'commit gemspec' do
|
105
|
+
assert_received(@command, &:commit_gemspec!)
|
109
106
|
end
|
110
107
|
|
111
|
-
should
|
112
|
-
assert_received(@repo) {|repo| repo.push('origin', 'v3:v3') }
|
108
|
+
should 'push' do
|
109
|
+
assert_received(@repo) { |repo| repo.push('origin', 'v3:v3') }
|
113
110
|
end
|
114
111
|
end
|
115
112
|
|
116
|
-
context
|
113
|
+
context 'with an unclean staging area' do
|
117
114
|
setup do
|
118
115
|
stub(@command).clean_staging_area? { false }
|
119
116
|
stub(@command).system
|
120
117
|
end
|
121
118
|
|
122
119
|
should 'raise error' do
|
123
|
-
assert_raises RuntimeError,
|
120
|
+
assert_raises RuntimeError, 'Unclean staging area! Be sure to commit or .gitignore everything first. See `git status` above.' do
|
124
121
|
@command.run
|
125
122
|
end
|
126
123
|
end
|
127
124
|
|
128
125
|
should 'display git status' do
|
129
|
-
|
130
|
-
|
126
|
+
begin
|
127
|
+
@command.run
|
128
|
+
rescue
|
129
|
+
nil
|
130
|
+
end
|
131
|
+
assert_received(@command) { |command| command.system('git status') }
|
131
132
|
end
|
132
133
|
end
|
133
134
|
|
134
|
-
context
|
135
|
+
context 'with an unchanged gemspec' do
|
135
136
|
setup do
|
136
137
|
stub(@command).clean_staging_area? { true }
|
137
138
|
|
@@ -149,21 +150,20 @@ class Jeweler
|
|
149
150
|
@command.run
|
150
151
|
end
|
151
152
|
|
152
|
-
should
|
153
|
-
assert_received(@repo) {|repo| repo.checkout('master') }
|
153
|
+
should 'checkout master' do
|
154
|
+
assert_received(@repo) { |repo| repo.checkout('master') }
|
154
155
|
end
|
155
156
|
|
156
|
-
should
|
157
|
-
assert_received(@command
|
157
|
+
should 'regenerate gemspec' do
|
158
|
+
assert_received(@command, &:regenerate_gemspec!)
|
158
159
|
end
|
159
160
|
|
160
|
-
should
|
161
|
-
assert_received(@repo) {|repo| repo.push('origin', 'master:master') }
|
161
|
+
should 'push' do
|
162
|
+
assert_received(@repo) { |repo| repo.push('origin', 'master:master') }
|
162
163
|
end
|
163
|
-
|
164
164
|
end
|
165
165
|
|
166
|
-
context
|
166
|
+
context 'with a release already tagged' do
|
167
167
|
setup do
|
168
168
|
stub(@command).clean_staging_area? { true }
|
169
169
|
|
@@ -181,59 +181,56 @@ class Jeweler
|
|
181
181
|
@command.run
|
182
182
|
end
|
183
183
|
|
184
|
-
should
|
185
|
-
assert_received(@repo) {|repo| repo.checkout('master') }
|
184
|
+
should 'checkout master' do
|
185
|
+
assert_received(@repo) { |repo| repo.checkout('master') }
|
186
186
|
end
|
187
187
|
|
188
|
-
should
|
189
|
-
assert_received(@command
|
188
|
+
should 'regenerate gemspec' do
|
189
|
+
assert_received(@command, &:regenerate_gemspec!)
|
190
190
|
end
|
191
191
|
|
192
|
-
should
|
193
|
-
assert_received(@command
|
192
|
+
should 'commit gemspec' do
|
193
|
+
assert_received(@command, &:commit_gemspec!)
|
194
194
|
end
|
195
195
|
|
196
|
-
should
|
197
|
-
assert_received(@repo) {|repo| repo.push('origin', 'master:master') }
|
196
|
+
should 'push' do
|
197
|
+
assert_received(@repo) { |repo| repo.push('origin', 'master:master') }
|
198
198
|
end
|
199
|
-
|
200
199
|
end
|
201
|
-
|
202
200
|
end
|
203
201
|
|
204
|
-
|
205
|
-
build_command_context "building from jeweler" do
|
202
|
+
build_command_context 'building from jeweler' do
|
206
203
|
setup do
|
207
204
|
@command = Jeweler::Commands::ReleaseGemspec.build_for(@jeweler)
|
208
205
|
end
|
209
206
|
|
210
|
-
should
|
207
|
+
should 'assign gemspec' do
|
211
208
|
assert_same @gemspec, @command.gemspec
|
212
209
|
end
|
213
210
|
|
214
|
-
should
|
211
|
+
should 'assign version' do
|
215
212
|
assert_same @version, @command.version
|
216
213
|
end
|
217
214
|
|
218
|
-
should
|
215
|
+
should 'assign repo' do
|
219
216
|
assert_same @repo, @command.repo
|
220
217
|
end
|
221
218
|
|
222
|
-
should
|
219
|
+
should 'assign output' do
|
223
220
|
assert_same @output, @command.output
|
224
221
|
end
|
225
222
|
|
226
|
-
should
|
223
|
+
should 'assign gemspec_helper' do
|
227
224
|
assert_same @gemspec_helper, @command.gemspec_helper
|
228
225
|
end
|
229
226
|
|
230
|
-
should
|
227
|
+
should 'assign base_dir' do
|
231
228
|
assert_same @base_dir, @command.base_dir
|
232
229
|
end
|
233
230
|
end
|
234
231
|
|
235
|
-
# FIXME this code had its ruby-git stuff replaced with `` and system, which is much harder to test, so re-enable these someday
|
236
|
-
#context "clean_staging_area?" do
|
232
|
+
# FIXME: this code had its ruby-git stuff replaced with `` and system, which is much harder to test, so re-enable these someday
|
233
|
+
# context "clean_staging_area?" do
|
237
234
|
|
238
235
|
# should "be false if there added files" do
|
239
236
|
# repo = build_repo :added => %w(README)
|
@@ -269,9 +266,9 @@ class Jeweler
|
|
269
266
|
|
270
267
|
# assert command.clean_staging_area?
|
271
268
|
# end
|
272
|
-
#end
|
269
|
+
# end
|
273
270
|
|
274
|
-
context
|
271
|
+
context 'regenerate_gemspec!' do
|
275
272
|
setup do
|
276
273
|
@repo = Object.new
|
277
274
|
stub(@repo) do
|
@@ -282,30 +279,30 @@ class Jeweler
|
|
282
279
|
@gemspec_helper = Object.new
|
283
280
|
stub(@gemspec_helper) do
|
284
281
|
write
|
285
|
-
path {'zomg.gemspec'}
|
282
|
+
path { 'zomg.gemspec' }
|
286
283
|
update_version('1.2.3')
|
287
284
|
end
|
288
285
|
|
289
286
|
@output = StringIO.new
|
290
287
|
|
291
|
-
@command
|
292
|
-
|
293
|
-
|
294
|
-
|
288
|
+
@command = Jeweler::Commands::ReleaseGemspec.new output: @output,
|
289
|
+
repo: @repo,
|
290
|
+
gemspec_helper: @gemspec_helper,
|
291
|
+
version: '1.2.3'
|
295
292
|
|
296
293
|
@command.regenerate_gemspec!
|
297
294
|
end
|
298
295
|
|
299
|
-
should
|
300
|
-
assert_received(@gemspec_helper) {|gemspec_helper| gemspec_helper.update_version('1.2.3') }
|
296
|
+
should 'refresh gemspec version' do
|
297
|
+
assert_received(@gemspec_helper) { |gemspec_helper| gemspec_helper.update_version('1.2.3') }
|
301
298
|
end
|
302
299
|
|
303
|
-
should
|
304
|
-
assert_received(@gemspec_helper
|
300
|
+
should 'write gemspec' do
|
301
|
+
assert_received(@gemspec_helper, &:write)
|
305
302
|
end
|
306
303
|
end
|
307
304
|
|
308
|
-
context
|
305
|
+
context 'commit_gemspec!' do
|
309
306
|
setup do
|
310
307
|
@repo = Object.new
|
311
308
|
stub(@repo) do
|
@@ -315,32 +312,31 @@ class Jeweler
|
|
315
312
|
|
316
313
|
@gemspec_helper = Object.new
|
317
314
|
stub(@gemspec_helper) do
|
318
|
-
path {'zomg.gemspec'}
|
315
|
+
path { 'zomg.gemspec' }
|
319
316
|
update_version('1.2.3')
|
320
317
|
end
|
321
318
|
|
322
319
|
@output = StringIO.new
|
323
320
|
|
324
|
-
@command
|
325
|
-
|
326
|
-
|
327
|
-
|
321
|
+
@command = Jeweler::Commands::ReleaseGemspec.new output: @output,
|
322
|
+
repo: @repo,
|
323
|
+
gemspec_helper: @gemspec_helper,
|
324
|
+
version: '1.2.3'
|
328
325
|
|
329
|
-
stub(@command).working_subdir { Pathname.new(
|
326
|
+
stub(@command).working_subdir { Pathname.new('.') }
|
330
327
|
@command.commit_gemspec!
|
331
328
|
end
|
332
329
|
|
333
|
-
should
|
334
|
-
assert_received(@repo) {|repo| repo.add('zomg.gemspec') }
|
330
|
+
should 'add gemspec to repository' do
|
331
|
+
assert_received(@repo) { |repo| repo.add('zomg.gemspec') }
|
335
332
|
end
|
336
333
|
|
337
|
-
should
|
338
|
-
assert_received(@repo) {|repo| repo.commit(
|
334
|
+
should 'commit with commit message including version' do
|
335
|
+
assert_received(@repo) { |repo| repo.commit('Regenerate gemspec for version 1.2.3') }
|
339
336
|
end
|
340
|
-
|
341
337
|
end
|
342
338
|
|
343
|
-
context
|
339
|
+
context 'commit_gemspec! in top dir' do
|
344
340
|
setup do
|
345
341
|
@repo = Object.new
|
346
342
|
|
@@ -351,33 +347,33 @@ class Jeweler
|
|
351
347
|
|
352
348
|
@gemspec_helper = Object.new
|
353
349
|
stub(@gemspec_helper) do
|
354
|
-
path {'zomg.gemspec'}
|
350
|
+
path { 'zomg.gemspec' }
|
355
351
|
update_version('1.2.3')
|
356
352
|
end
|
357
353
|
|
358
354
|
@output = StringIO.new
|
359
355
|
|
360
|
-
@command = Jeweler::Commands::ReleaseGemspec.new :
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
356
|
+
@command = Jeweler::Commands::ReleaseGemspec.new output: @output,
|
357
|
+
repo: @repo,
|
358
|
+
gemspec_helper: @gemspec_helper,
|
359
|
+
version: '1.2.3',
|
360
|
+
base_dir: '.'
|
365
361
|
|
366
362
|
@dir = Object.new
|
367
363
|
stub(@repo).dir { @dir }
|
368
|
-
stub(@dir).path {
|
364
|
+
stub(@dir).path { '/x/y/z' }
|
369
365
|
|
370
|
-
stub(@command).base_dir_path { Pathname.new(
|
366
|
+
stub(@command).base_dir_path { Pathname.new('/x/y/z') }
|
371
367
|
|
372
368
|
@command.commit_gemspec!
|
373
369
|
end
|
374
370
|
|
375
|
-
should
|
376
|
-
assert_received(@repo) {|repo| repo.add('zomg.gemspec') }
|
371
|
+
should 'add gemspec to repository' do
|
372
|
+
assert_received(@repo) { |repo| repo.add('zomg.gemspec') }
|
377
373
|
end
|
378
374
|
end
|
379
375
|
|
380
|
-
context
|
376
|
+
context 'commit_gemspec! in sub dir' do
|
381
377
|
setup do
|
382
378
|
@repo = Object.new
|
383
379
|
|
@@ -388,33 +384,33 @@ class Jeweler
|
|
388
384
|
|
389
385
|
@gemspec_helper = Object.new
|
390
386
|
stub(@gemspec_helper) do
|
391
|
-
path {'zomg.gemspec'}
|
387
|
+
path { 'zomg.gemspec' }
|
392
388
|
update_version('1.2.3')
|
393
389
|
end
|
394
390
|
|
395
391
|
@output = StringIO.new
|
396
392
|
|
397
|
-
@command = Jeweler::Commands::ReleaseGemspec.new :
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
393
|
+
@command = Jeweler::Commands::ReleaseGemspec.new output: @output,
|
394
|
+
repo: @repo,
|
395
|
+
gemspec_helper: @gemspec_helper,
|
396
|
+
version: '1.2.3',
|
397
|
+
base_dir: '.'
|
402
398
|
|
403
399
|
@dir = Object.new
|
404
400
|
stub(@repo).dir { @dir }
|
405
|
-
stub(@dir).path {
|
401
|
+
stub(@dir).path { '/x/y/z' }
|
406
402
|
|
407
|
-
stub(@command).base_dir_path { Pathname.new(
|
403
|
+
stub(@command).base_dir_path { Pathname.new('/x/y/z/gem') }
|
408
404
|
|
409
405
|
@command.commit_gemspec!
|
410
406
|
end
|
411
407
|
|
412
|
-
should
|
413
|
-
assert_received(@repo) {|repo| repo.add('gem/zomg.gemspec') }
|
408
|
+
should 'add gemspec to repository' do
|
409
|
+
assert_received(@repo) { |repo| repo.add('gem/zomg.gemspec') }
|
414
410
|
end
|
415
411
|
end
|
416
412
|
|
417
|
-
context
|
413
|
+
context 'release_tagged? when no tag exists' do
|
418
414
|
setup do
|
419
415
|
@repo = Object.new
|
420
416
|
stub(@repo).tag('v1.2.3') { raise Git::GitTagNameDoesNotExist, tag }
|
@@ -427,13 +423,12 @@ class Jeweler
|
|
427
423
|
@command.version = '1.2.3'
|
428
424
|
end
|
429
425
|
|
430
|
-
should_eventually
|
426
|
+
should_eventually 'be true' do
|
431
427
|
assert @command.release_not_tagged?
|
432
428
|
end
|
433
|
-
|
434
429
|
end
|
435
430
|
|
436
|
-
context
|
431
|
+
context 'release_tagged? when tag exists' do
|
437
432
|
setup do
|
438
433
|
@repo = Object.new
|
439
434
|
stub(@repo) do
|
@@ -448,10 +443,9 @@ class Jeweler
|
|
448
443
|
@command.version = '1.2.3'
|
449
444
|
end
|
450
445
|
|
451
|
-
should_eventually
|
446
|
+
should_eventually 'be false' do
|
452
447
|
assert @command.release_not_tagged?
|
453
448
|
end
|
454
|
-
|
455
449
|
end
|
456
450
|
|
457
451
|
def build_repo(options = {})
|
@@ -462,7 +456,7 @@ class Jeweler
|
|
462
456
|
end
|
463
457
|
|
464
458
|
def build_status(options = {})
|
465
|
-
options = {:
|
459
|
+
options = { added: [], deleted: [], changed: [] }.merge(options)
|
466
460
|
|
467
461
|
status = Object.new
|
468
462
|
stub(status) do
|
@@ -470,7 +464,6 @@ class Jeweler
|
|
470
464
|
deleted { options[:deleted] }
|
471
465
|
changed { options[:changed] }
|
472
466
|
end
|
473
|
-
|
474
467
|
end
|
475
468
|
end
|
476
469
|
end
|