diff options
author | Andre Arko <andre@arko.net> | 2017-11-28 23:53:29 -0800 |
---|---|---|
committer | Andre Arko <andre@arko.net> | 2017-11-28 23:59:11 -0800 |
commit | b2ac724e637cd6dc7ca9cdd74655d3581ae9cc3b (patch) | |
tree | 38c2a23b48109c14ee5e936fb1aa4c4c373e6632 | |
parent | c763898168474a8b48e6f3b2bdff97048163e38b (diff) | |
download | bundler-indirect/fix-6072.tar.gz |
finally working test for the inline double-checkindirect/fix-6072
this test appears to only fail when the server is rubygems.org, so I
moved the test into realworld and pulled in vcr.
-rw-r--r-- | spec/realworld/double_check_spec.rb | 40 | ||||
-rw-r--r-- | spec/support/artifice/vcr_cassettes/realworld/rubygems.org/gems/rack-2.0.1.gem/GET/request | 7 | ||||
-rw-r--r-- | spec/support/artifice/vcr_cassettes/realworld/rubygems.org/gems/rack-2.0.1.gem/GET/response | bin | 0 -> 254790 bytes |
3 files changed, 47 insertions, 0 deletions
diff --git a/spec/realworld/double_check_spec.rb b/spec/realworld/double_check_spec.rb new file mode 100644 index 0000000000..6fee578a71 --- /dev/null +++ b/spec/realworld/double_check_spec.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +RSpec.describe "double checking sources", :realworld => true do + it "finds already-installed gems" do + create_file("rails.gemspec", <<-RUBY) + Gem::Specification.new do |s| + s.name = "rails" + s.version = "5.1.4" + s.summary = "" + s.description = "" + s.author = "" + s.add_dependency "actionpack", "5.1.4" + end + RUBY + + create_file("actionpack.gemspec", <<-RUBY) + Gem::Specification.new do |s| + s.name = "actionpack" + s.version = "5.1.4" + s.summary = "" + s.description = "" + s.author = "" + s.add_dependency "rack", "~> 2.0.0" + end + RUBY + + cmd = <<-RUBY + require "bundler" + require #{File.expand_path("../../support/artifice/vcr.rb", __FILE__).dump} + require "bundler/inline" + gemfile(true) do + source "https://rubygems.org" + gem "rails", path: "." + end + RUBY + + ruby! cmd + ruby! cmd + end +end diff --git a/spec/support/artifice/vcr_cassettes/realworld/rubygems.org/gems/rack-2.0.1.gem/GET/request b/spec/support/artifice/vcr_cassettes/realworld/rubygems.org/gems/rack-2.0.1.gem/GET/request new file mode 100644 index 0000000000..ed63e334fa --- /dev/null +++ b/spec/support/artifice/vcr_cassettes/realworld/rubygems.org/gems/rack-2.0.1.gem/GET/request @@ -0,0 +1,7 @@ +> GET /gems/rack-2.0.1.gem +> accept-encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3 +> accept: */* +> user-agent: Ruby +> connection: keep-alive +> keep-alive: 30 +> host: rubygems.org
\ No newline at end of file diff --git a/spec/support/artifice/vcr_cassettes/realworld/rubygems.org/gems/rack-2.0.1.gem/GET/response b/spec/support/artifice/vcr_cassettes/realworld/rubygems.org/gems/rack-2.0.1.gem/GET/response Binary files differnew file mode 100644 index 0000000000..4e2fc2b8cd --- /dev/null +++ b/spec/support/artifice/vcr_cassettes/realworld/rubygems.org/gems/rack-2.0.1.gem/GET/response |