summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2017-04-06 23:58:43 -0500
committerSamuel Giddins <segiddins@segiddins.me>2017-04-07 12:03:15 -0500
commitada8798a3f3eb380dc4c00f0f7d017d190693df2 (patch)
tree8f81c042eb0e756bedce0e0664327d64db4b2e4e
parent425fc28bb8cf7254996b4c445e66cfab67c8543f (diff)
downloadbundler-ada8798a3f3eb380dc4c00f0f7d017d190693df2.tar.gz
[StubSpecification] Assign source when materializing the full spec
-rw-r--r--lib/bundler/stub_specification.rb6
-rw-r--r--spec/bundler/plugin/installer_spec.rb3
2 files changed, 6 insertions, 3 deletions
diff --git a/lib/bundler/stub_specification.rb b/lib/bundler/stub_specification.rb
index 9e43f06364..a9c79a03f5 100644
--- a/lib/bundler/stub_specification.rb
+++ b/lib/bundler/stub_specification.rb
@@ -48,8 +48,8 @@ module Bundler
stub.loaded_from
end
- def matches_for_glob
- stub.matches_for_glob
+ def matches_for_glob(glob)
+ stub.matches_for_glob(glob)
end
def raw_require_paths
@@ -78,6 +78,8 @@ module Bundler
" to fix the cached spec."
end
+ rs.source = source
+
rs
end
end
diff --git a/spec/bundler/plugin/installer_spec.rb b/spec/bundler/plugin/installer_spec.rb
index 2454ef00f9..e8d5941e33 100644
--- a/spec/bundler/plugin/installer_spec.rb
+++ b/spec/bundler/plugin/installer_spec.rb
@@ -54,7 +54,8 @@ RSpec.describe Bundler::Plugin::Installer do
end
it "returns the installed spec after installing" do
- expect(result["ga-plugin"]).to be_kind_of(Gem::Specification)
+ spec = result["ga-plugin"]
+ expect(spec.full_name).to eq "ga-plugin-1.0"
end
it "has expected full gem path" do