rubygems-update 2.4.1 → 2.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of rubygems-update might be problematic. Click here for more details.

Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data.tar.gz.sig +0 -0
  4. data/History.txt +38 -0
  5. data/README.rdoc +1 -1
  6. data/Rakefile +3 -3
  7. data/lib/rubygems.rb +1 -1
  8. data/lib/rubygems/command_manager.rb +1 -1
  9. data/lib/rubygems/commands/owner_command.rb +3 -1
  10. data/lib/rubygems/commands/update_command.rb +6 -5
  11. data/lib/rubygems/config_file.rb +1 -1
  12. data/lib/rubygems/dependency.rb +4 -2
  13. data/lib/rubygems/dependency_installer.rb +2 -0
  14. data/lib/rubygems/exceptions.rb +2 -2
  15. data/lib/rubygems/installer.rb +13 -4
  16. data/lib/rubygems/local_remote_options.rb +1 -1
  17. data/lib/rubygems/package/tar_reader/entry.rb +2 -0
  18. data/lib/rubygems/rdoc.rb +0 -1
  19. data/lib/rubygems/request/connection_pools.rb +5 -3
  20. data/lib/rubygems/request_set.rb +57 -1
  21. data/lib/rubygems/request_set/gem_dependency_api.rb +58 -10
  22. data/lib/rubygems/request_set/lockfile.rb +13 -5
  23. data/lib/rubygems/resolver.rb +2 -1
  24. data/lib/rubygems/resolver/composed_set.rb +12 -0
  25. data/lib/rubygems/resolver/conflict.rb +2 -2
  26. data/lib/rubygems/resolver/dependency_request.rb +2 -2
  27. data/lib/rubygems/resolver/index_set.rb +1 -1
  28. data/lib/rubygems/resolver/installer_set.rb +6 -0
  29. data/lib/rubygems/resolver/lock_specification.rb +4 -0
  30. data/lib/rubygems/resolver/set.rb +8 -2
  31. data/lib/rubygems/resolver/vendor_set.rb +2 -0
  32. data/lib/rubygems/source.rb +2 -0
  33. data/lib/rubygems/source/git.rb +10 -2
  34. data/lib/rubygems/specification.rb +9 -3
  35. data/lib/rubygems/stub_specification.rb +5 -0
  36. data/lib/rubygems/test_case.rb +1 -1
  37. data/lib/rubygems/test_utilities.rb +2 -0
  38. data/lib/rubygems/user_interaction.rb +10 -0
  39. data/lib/rubygems/util.rb +14 -1
  40. data/test/rubygems/test_gem_commands_setup_command.rb +6 -8
  41. data/test/rubygems/test_gem_commands_uninstall_command.rb +1 -1
  42. data/test/rubygems/test_gem_commands_update_command.rb +28 -0
  43. data/test/rubygems/test_gem_dependency.rb +27 -0
  44. data/test/rubygems/test_gem_dependency_installer.rb +21 -0
  45. data/test/rubygems/test_gem_ext_builder.rb +1 -1
  46. data/test/rubygems/test_gem_impossible_dependencies_error.rb +6 -6
  47. data/test/rubygems/test_gem_installer.rb +27 -3
  48. data/test/rubygems/test_gem_remote_fetcher.rb +4 -0
  49. data/test/rubygems/test_gem_request_connection_pools.rb +37 -0
  50. data/test/rubygems/test_gem_request_set.rb +20 -1
  51. data/test/rubygems/test_gem_request_set_gem_dependency_api.rb +95 -9
  52. data/test/rubygems/test_gem_request_set_lockfile.rb +54 -0
  53. data/test/rubygems/test_gem_resolver_composed_set.rb +13 -0
  54. data/test/rubygems/test_gem_resolver_conflict.rb +2 -2
  55. data/test/rubygems/test_gem_resolver_dependency_request.rb +9 -0
  56. data/test/rubygems/test_gem_resolver_installer_set.rb +12 -0
  57. data/test/rubygems/test_gem_resolver_lock_specification.rb +11 -0
  58. data/test/rubygems/test_gem_resolver_vendor_set.rb +3 -1
  59. data/test/rubygems/test_gem_silent_ui.rb +5 -0
  60. data/test/rubygems/test_gem_source.rb +13 -0
  61. data/test/rubygems/test_gem_source_git.rb +15 -0
  62. data/test/rubygems/test_gem_specification.rb +46 -10
  63. data/test/rubygems/test_gem_stub_specification.rb +10 -0
  64. metadata +3 -3
  65. metadata.gz.sig +0 -0
@@ -126,6 +126,27 @@ class TestGemDependencyInstaller < Gem::TestCase
126
126
  assert_equal [p1a], inst.installed_gems
127
127
  end
128
128
 
129
+ def test_install_prerelease_bug_990
130
+ spec_fetcher do |fetcher|
131
+ fetcher.gem 'a', '1.b' do |s|
132
+ s.add_dependency 'b', '~> 1.a'
133
+ end
134
+
135
+ fetcher.gem 'b', '1.b' do |s|
136
+ s.add_dependency 'c', '>= 1'
137
+ end
138
+
139
+ fetcher.gem 'c', '1.1.b'
140
+ end
141
+
142
+ dep = Gem::Dependency.new 'a'
143
+
144
+ inst = Gem::DependencyInstaller.new :prerelease => true
145
+ inst.install dep
146
+
147
+ assert_equal %w[a-1.b b-1.b c-1.1.b], Gem::Specification.map(&:full_name)
148
+ end
149
+
129
150
  def test_install_when_only_prerelease
130
151
  p1a, gem = util_gem 'p', '1.a'
131
152
 
@@ -245,7 +245,7 @@ install:
245
245
  refute_path_exists @spec.gem_build_complete_path
246
246
 
247
247
  skip "Gem.ruby is not the name of the binary being run in the end" \
248
- unless File.read(gem_make_out).include? "#{Regexp.escape Gem.ruby}:"
248
+ unless File.read(gem_make_out).include? "#{Gem.ruby}:"
249
249
 
250
250
  assert_match %r%#{Regexp.escape Gem.ruby}: No such file%,
251
251
  File.read(gem_make_out)
@@ -32,24 +32,24 @@ rye-0.9.8 requires net-ssh (>= 2.0.13) but it conflicted:
32
32
  which does not match conflicting dependency (~> 2.2.2)
33
33
 
34
34
  Conflicting dependency chains:
35
- rye (= 0.9.8), 0.9.8 activated depends on
35
+ rye (= 0.9.8), 0.9.8 activated, depends on
36
36
  net-ssh (>= 2.0.13), 2.6.5 activated
37
37
 
38
38
  versus:
39
- rye (= 0.9.8), 0.9.8 activated depends on
40
- net-ssh (>= 2.0.13), 2.6.5 activated depends on
39
+ rye (= 0.9.8), 0.9.8 activated, depends on
40
+ net-ssh (>= 2.0.13), 2.6.5 activated, depends on
41
41
  net-ssh (~> 2.2.2)
42
42
 
43
43
  Activated net-ssh-2.2.2
44
44
  which does not match conflicting dependency (>= 2.6.5)
45
45
 
46
46
  Conflicting dependency chains:
47
- rye (= 0.9.8), 0.9.8 activated depends on
47
+ rye (= 0.9.8), 0.9.8 activated, depends on
48
48
  net-ssh (>= 2.0.13), 2.2.2 activated
49
49
 
50
50
  versus:
51
- rye (= 0.9.8), 0.9.8 activated depends on
52
- net-ssh (>= 2.0.13), 2.2.2 activated depends on
51
+ rye (= 0.9.8), 0.9.8 activated, depends on
52
+ net-ssh (>= 2.0.13), 2.2.2 activated, depends on
53
53
  net-ssh (>= 2.6.5)
54
54
 
55
55
  EXPECTED
@@ -189,8 +189,14 @@ gem 'other', version
189
189
  end unless Gem.win_platform?
190
190
 
191
191
  def test_check_that_user_bin_dir_is_in_path
192
+ bin_dir = @installer.bin_dir
193
+
194
+ if Gem.win_platform?
195
+ bin_dir = bin_dir.downcase.gsub(File::SEPARATOR, File::ALT_SEPARATOR)
196
+ end
197
+
192
198
  orig_PATH, ENV['PATH'] =
193
- ENV['PATH'], [ENV['PATH'], @installer.bin_dir].join(File::PATH_SEPARATOR)
199
+ ENV['PATH'], [ENV['PATH'], bin_dir].join(File::PATH_SEPARATOR)
194
200
 
195
201
  use_ui @ui do
196
202
  @installer.check_that_user_bin_dir_is_in_path
@@ -202,6 +208,8 @@ gem 'other', version
202
208
  end
203
209
 
204
210
  def test_check_that_user_bin_dir_is_in_path_tilde
211
+ skip "Tilde is PATH is not supported under MS Windows" if win_platform?
212
+
205
213
  orig_PATH, ENV['PATH'] =
206
214
  ENV['PATH'], [ENV['PATH'], '~/bin'].join(File::PATH_SEPARATOR)
207
215
 
@@ -213,7 +221,7 @@ gem 'other', version
213
221
 
214
222
  assert_empty @ui.error
215
223
  ensure
216
- ENV['PATH'] = orig_PATH
224
+ ENV['PATH'] = orig_PATH unless win_platform?
217
225
  end
218
226
 
219
227
  def test_check_that_user_bin_dir_is_in_path_not_in_path
@@ -221,7 +229,13 @@ gem 'other', version
221
229
  @installer.check_that_user_bin_dir_is_in_path
222
230
  end
223
231
 
224
- assert_match @installer.bin_dir, @ui.error
232
+ expected = @installer.bin_dir
233
+
234
+ if Gem.win_platform? then
235
+ expected = expected.downcase.gsub(File::SEPARATOR, File::ALT_SEPARATOR)
236
+ end
237
+
238
+ assert_match expected, @ui.error
225
239
  end
226
240
 
227
241
  def test_ensure_dependency
@@ -1112,6 +1126,16 @@ gem 'other', version
1112
1126
  refute @installer.installation_satisfies_dependency?(dep)
1113
1127
  end
1114
1128
 
1129
+ def test_installation_satisfies_dependency_eh_development
1130
+ @installer.options[:development] = true
1131
+ @installer.options[:dev_shallow] = true
1132
+
1133
+ util_spec 'a'
1134
+
1135
+ dep = Gem::Dependency.new 'a', :development
1136
+ assert @installer.installation_satisfies_dependency?(dep)
1137
+ end
1138
+
1115
1139
  def test_pre_install_checks_dependencies
1116
1140
  @spec.add_dependency 'b', '> 5'
1117
1141
  util_setup_gem
@@ -837,6 +837,8 @@ gems:
837
837
  rescue Exception => ex
838
838
  abort ex.message
839
839
  puts "ERROR during server thread: #{ex.message}"
840
+ ensure
841
+ server.shutdown
840
842
  end
841
843
  end
842
844
  while server.status != :Running
@@ -888,6 +890,8 @@ gems:
888
890
  s.start
889
891
  rescue Exception => ex
890
892
  abort "ERROR during server thread: #{ex.message}"
893
+ ensure
894
+ s.shutdown
891
895
  end
892
896
  end
893
897
  th[:server] = s
@@ -35,6 +35,43 @@ class TestGemRequestConnectionPool < Gem::TestCase
35
35
  assert_equal conn, pool.checkout
36
36
  end
37
37
 
38
+ def test_to_proxy_eh
39
+ pools = Gem::Request::ConnectionPools.new nil, []
40
+
41
+ env_no_proxy = %w[
42
+ 1.no-proxy.example
43
+ 2.no-proxy.example
44
+ ]
45
+
46
+ no_proxy = pools.send :no_proxy?, '2.no-proxy.example', env_no_proxy
47
+
48
+ assert no_proxy, 'match'
49
+
50
+ no_proxy = pools.send :no_proxy?, 'proxy.example', env_no_proxy
51
+
52
+ refute no_proxy, 'mismatch'
53
+ end
54
+
55
+ def test_to_proxy_eh_wildcard
56
+ pools = Gem::Request::ConnectionPools.new nil, []
57
+
58
+ env_no_proxy = %w[
59
+ .no-proxy.example
60
+ ]
61
+
62
+ no_proxy = pools.send :no_proxy?, '2.no-proxy.example', env_no_proxy
63
+
64
+ assert no_proxy, 'wildcard matching subdomain'
65
+
66
+ no_proxy = pools.send :no_proxy?, 'no-proxy.example', env_no_proxy
67
+
68
+ assert no_proxy, 'wildcard matching dotless domain'
69
+
70
+ no_proxy = pools.send :no_proxy?, 'proxy.example', env_no_proxy
71
+
72
+ refute no_proxy, 'wildcard mismatch'
73
+ end
74
+
38
75
  def test_net_http_args
39
76
  pools = Gem::Request::ConnectionPools.new nil, []
40
77
 
@@ -229,7 +229,7 @@ ruby "0"
229
229
  def test_load_gemdeps_installing
230
230
  rs = Gem::RequestSet.new
231
231
 
232
- Tempfile.open 'gem.deps.rb' do |io|
232
+ tf = Tempfile.open 'gem.deps.rb' do |io|
233
233
  io.puts 'ruby "0"'
234
234
  io.puts 'gem "a"'
235
235
  io.flush
@@ -237,7 +237,9 @@ ruby "0"
237
237
  gem_deps = rs.load_gemdeps io.path, [], true
238
238
 
239
239
  assert_kind_of Gem::RequestSet::GemDependencyAPI, gem_deps
240
+ io
240
241
  end
242
+ tf.close! if tf.respond_to? :close!
241
243
 
242
244
  assert_equal [dep('a')], rs.dependencies
243
245
  end
@@ -276,6 +278,23 @@ ruby "0"
276
278
  refute_same orig_errors, rs.errors
277
279
  end
278
280
 
281
+ def test_bug_bug_990
282
+ a = util_spec 'a', '1.b', 'b' => '~> 1.a'
283
+ b = util_spec 'b', '1.b', 'c' => '>= 1'
284
+ c = util_spec 'c', '1.1.b'
285
+
286
+ rs = Gem::RequestSet.new
287
+ rs.gem 'a'
288
+ rs.prerelease = true
289
+
290
+ res = rs.resolve StaticSet.new([a, b, c])
291
+ assert_equal 3, res.size
292
+
293
+ names = res.map { |s| s.full_name }.sort
294
+
295
+ assert_equal %w[a-1.b b-1.b c-1.1.b], names
296
+ end
297
+
279
298
  def test_resolve_development
280
299
  a = util_spec 'a', 1
281
300
  spec = Gem::Resolver::SpecSpecification.new nil, a
@@ -74,6 +74,18 @@ class TestGemRequestSetGemDependencyAPI < Gem::TestCase
74
74
  assert_equal expected, @gda.dependencies
75
75
  end
76
76
 
77
+ def test_gem_duplicate
78
+ @gda.gem 'a'
79
+
80
+ _, err = capture_io do
81
+ @gda.gem 'a'
82
+ end
83
+
84
+ expected = "Gem dependencies file gem.deps.rb requires a more than once."
85
+
86
+ assert_match expected, err
87
+ end
88
+
77
89
  def test_gem_git
78
90
  @gda.gem 'a', :git => 'git/a'
79
91
 
@@ -86,6 +98,32 @@ class TestGemRequestSetGemDependencyAPI < Gem::TestCase
86
98
  assert_equal expected, @gda.dependencies
87
99
  end
88
100
 
101
+ def test_gem_bitbucket
102
+ @gda.gem 'a', :bitbucket => 'example/repository'
103
+
104
+ assert_equal [dep('a')], @set.dependencies
105
+
106
+ assert_equal %w[https://example@bitbucket.org/example/repository.git master],
107
+ @git_set.repositories['a']
108
+
109
+ expected = { 'a' => '!' }
110
+
111
+ assert_equal expected, @gda.dependencies
112
+ end
113
+
114
+ def test_gem_bitbucket_expand_path
115
+ @gda.gem 'a', :bitbucket => 'example'
116
+
117
+ assert_equal [dep('a')], @set.dependencies
118
+
119
+ assert_equal %w[https://example@bitbucket.org/example/example.git master],
120
+ @git_set.repositories['a']
121
+
122
+ expected = { 'a' => '!' }
123
+
124
+ assert_equal expected, @gda.dependencies
125
+ end
126
+
89
127
  def test_gem_git_branch
90
128
  @gda.gem 'a', :git => 'git/a', :branch => 'other', :tag => 'v1'
91
129
 
@@ -141,6 +179,19 @@ class TestGemRequestSetGemDependencyAPI < Gem::TestCase
141
179
  assert_equal expected, @gda.dependencies
142
180
  end
143
181
 
182
+ def test_gem_github_expand_path
183
+ @gda.gem 'a', :github => 'example'
184
+
185
+ assert_equal [dep('a')], @set.dependencies
186
+
187
+ assert_equal %w[git://github.com/example/example.git master],
188
+ @git_set.repositories['a']
189
+
190
+ expected = { 'a' => '!' }
191
+
192
+ assert_equal expected, @gda.dependencies
193
+ end
194
+
144
195
  def test_gem_group
145
196
  @gda.gem 'a', :group => :test
146
197
 
@@ -274,6 +325,18 @@ class TestGemRequestSetGemDependencyAPI < Gem::TestCase
274
325
  Gem.win_platform = win_platform
275
326
  end
276
327
 
328
+ def test_gem_platforms_platform
329
+ win_platform, Gem.win_platform = Gem.win_platform?, false
330
+
331
+ with_engine_version 'ruby', '2.0.0' do
332
+ @gda.gem 'a', :platforms => :jruby, :platform => :ruby
333
+
334
+ refute_empty @set.dependencies
335
+ end
336
+ ensure
337
+ Gem.win_platform = win_platform
338
+ end
339
+
277
340
  def test_gem_platforms_version
278
341
  with_engine_version 'ruby', '2.0.0' do
279
342
  @gda.gem 'a', :platforms => :ruby_18
@@ -397,9 +460,18 @@ class TestGemRequestSetGemDependencyAPI < Gem::TestCase
397
460
 
398
461
  @gda.gemspec
399
462
 
400
- assert_equal [dep('b', '= 2'), dep('c', '=3')], @set.dependencies
463
+ assert_equal [dep('a', '= 1'), dep('b', '= 2'), dep('c', '=3')],
464
+ @set.dependencies
401
465
 
402
466
  assert_equal %w[a], @gda.requires['a']
467
+
468
+ expected = {
469
+ 'a' => '!',
470
+ 'b' => req('= 2'),
471
+ 'c' => req('= 3'),
472
+ }
473
+
474
+ assert_equal expected, @gda.dependencies
403
475
  end
404
476
 
405
477
  def test_gemspec_bad
@@ -426,7 +498,7 @@ class TestGemRequestSetGemDependencyAPI < Gem::TestCase
426
498
 
427
499
  @gda.gemspec :development_group => :other
428
500
 
429
- assert_equal [dep('b', '= 2')], @set.dependencies
501
+ assert_equal [dep('a', '= 1'), dep('b', '= 2')], @set.dependencies
430
502
 
431
503
  assert_equal %w[a], @gda.requires['a']
432
504
  end
@@ -462,7 +534,7 @@ class TestGemRequestSetGemDependencyAPI < Gem::TestCase
462
534
 
463
535
  @gda.gemspec :name => 'b'
464
536
 
465
- assert_equal [dep('c', '= 3')], @set.dependencies
537
+ assert_equal [dep('b', '= 2'), dep('c', '= 3')], @set.dependencies
466
538
  end
467
539
 
468
540
  def test_gemspec_named
@@ -474,7 +546,7 @@ class TestGemRequestSetGemDependencyAPI < Gem::TestCase
474
546
 
475
547
  @gda.gemspec
476
548
 
477
- assert_equal [dep('b', '= 2')], @set.dependencies
549
+ assert_equal [dep('a', '= 1'), dep('b', '= 2')], @set.dependencies
478
550
  end
479
551
 
480
552
  def test_gemspec_none
@@ -496,7 +568,7 @@ class TestGemRequestSetGemDependencyAPI < Gem::TestCase
496
568
 
497
569
  @gda.gemspec :path => 'other'
498
570
 
499
- assert_equal [dep('b', '= 2')], @set.dependencies
571
+ assert_equal [dep('a', '= 1'), dep('b', '= 2')], @set.dependencies
500
572
  end
501
573
 
502
574
  def test_git
@@ -511,6 +583,16 @@ class TestGemRequestSetGemDependencyAPI < Gem::TestCase
511
583
  assert_equal %w[git://example/repo.git master], @git_set.repositories['b']
512
584
  end
513
585
 
586
+ def test_git_source
587
+ @gda.git_source :example do |repo_name|
588
+ "git://example/#{repo_name}.git"
589
+ end
590
+
591
+ @gda.gem 'a', :example => 'repo'
592
+
593
+ assert_equal %w[git://example/repo.git master], @git_set.repositories['a']
594
+ end
595
+
514
596
  def test_group
515
597
  @gda.group :test do
516
598
  @gda.gem 'a'
@@ -586,17 +668,21 @@ end
586
668
  def test_platform_multiple
587
669
  win_platform, Gem.win_platform = Gem.win_platform?, false
588
670
 
671
+ gda = @GDA.new @set, nil
672
+
589
673
  with_engine_version 'ruby', '1.8.7' do
590
- @gda.platform :mri_19, :mri_20 do
591
- @gda.gem 'a'
674
+ gda.platform :mri_19, :mri_20 do
675
+ gda.gem 'a'
592
676
  end
593
677
  end
594
678
 
595
679
  assert_empty @set.dependencies
596
680
 
681
+ gda = @GDA.new @set, nil
682
+
597
683
  with_engine_version 'ruby', '2.0.0' do
598
- @gda.platform :mri_19, :mri_20 do
599
- @gda.gem 'a'
684
+ gda.platform :mri_19, :mri_20 do
685
+ gda.gem 'a'
600
686
  end
601
687
  end
602
688
 
@@ -361,6 +361,8 @@ DEPENDENCIES
361
361
  end
362
362
 
363
363
  def test_parse_GIT
364
+ @set.instance_variable_set :@install_dir, 'install_dir'
365
+
364
366
  write_lockfile <<-LOCKFILE
365
367
  GIT
366
368
  remote: git://example/a.git
@@ -400,6 +402,7 @@ DEPENDENCIES
400
402
  }
401
403
 
402
404
  assert_equal expected, git_set.repositories
405
+ assert_equal 'install_dir', git_set.root_dir
403
406
  end
404
407
 
405
408
  def test_parse_GIT_branch
@@ -521,6 +524,7 @@ PATH
521
524
  remote: #{directory}
522
525
  specs:
523
526
  a (1)
527
+ b (2)
524
528
 
525
529
  DEPENDENCIES
526
530
  a!
@@ -543,6 +547,28 @@ DEPENDENCIES
543
547
  assert vendor_set, 'could not find a VendorSet'
544
548
 
545
549
  assert_equal %w[a-1], vendor_set.specs.values.map { |s| s.full_name }
550
+
551
+ spec = vendor_set.load_spec 'a', nil, nil, nil
552
+
553
+ assert_equal [dep('b', '= 2')], spec.dependencies
554
+ end
555
+
556
+ def test_parse_dependency
557
+ write_lockfile ' 1)'
558
+
559
+ @lockfile.tokenize
560
+
561
+ parsed = @lockfile.parse_dependency 'a', '='
562
+
563
+ assert_equal dep('a', '= 1'), parsed
564
+
565
+ write_lockfile ')'
566
+
567
+ @lockfile.tokenize
568
+
569
+ parsed = @lockfile.parse_dependency 'a', '2'
570
+
571
+ assert_equal dep('a', '= 2'), parsed
546
572
  end
547
573
 
548
574
  def test_parse_gem_specs_dependency
@@ -617,6 +643,16 @@ DEPENDENCIES
617
643
  assert_equal [:EOF], @lockfile.peek
618
644
  end
619
645
 
646
+ def test_relative_path_from
647
+ path = @lockfile.relative_path_from '/foo', '/foo/bar'
648
+
649
+ assert_equal '/foo', path
650
+
651
+ path = @lockfile.relative_path_from '/foo', '/foo'
652
+
653
+ assert_equal '.', path
654
+ end
655
+
620
656
  def test_skip
621
657
  tokens = [[:token]]
622
658
 
@@ -1190,5 +1226,23 @@ DEPENDENCIES
1190
1226
  refute_empty File.read gem_deps_lock_file
1191
1227
  end
1192
1228
 
1229
+ def test_write_error
1230
+ @set.gem 'nonexistent'
1231
+
1232
+ gem_deps_lock_file = "#{@gem_deps_file}.lock"
1233
+
1234
+ open gem_deps_lock_file, 'w' do |io|
1235
+ io.write 'hello'
1236
+ end
1237
+
1238
+ assert_raises Gem::UnsatisfiableDependencyError do
1239
+ @lockfile.write
1240
+ end
1241
+
1242
+ assert_path_exists gem_deps_lock_file
1243
+
1244
+ assert_equal 'hello', File.read(gem_deps_lock_file)
1245
+ end
1246
+
1193
1247
  end
1194
1248