summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorThe Bundler Bot <bot@bundler.io>2016-12-27 07:44:52 +0000
committerThe Bundler Bot <bot@bundler.io>2016-12-27 07:44:52 +0000
commitf90b514adb5ad1cf1a8fa1cda6f692d85db0e26c (patch)
tree3d46ff27719a3992e1ba61b2ed8057db407ce12f /spec
parent2a1cf4a46d73b9137ef9f74cd165881d4e68897e (diff)
parentf835151ad4e8b897e6e73f74166eee51549c7f77 (diff)
downloadbundler-f90b514adb5ad1cf1a8fa1cda6f692d85db0e26c.tar.gz
Auto merge of #5277 - bundler:Paxa-master, r=segiddins
Don't include dev deps in Index#dependency_names See #5256
Diffstat (limited to 'spec')
-rw-r--r--spec/bundler/index_spec.rb8
-rw-r--r--spec/runtime/load_spec.rb7
-rw-r--r--spec/support/builders.rb4
3 files changed, 12 insertions, 7 deletions
diff --git a/spec/bundler/index_spec.rb b/spec/bundler/index_spec.rb
index da8e5731ca..1ff592ca81 100644
--- a/spec/bundler/index_spec.rb
+++ b/spec/bundler/index_spec.rb
@@ -26,4 +26,12 @@ describe Bundler::Index do
end
end
end
+
+ context "with specs that include development dependencies" do
+ let(:specs) { [*build_spec("a", "1.0.0") {|s| s.development("b", "~> 1.0") }] }
+
+ it "does not include b in #dependency_names" do
+ expect(subject.dependency_names).not_to include("b")
+ end
+ end
end
diff --git a/spec/runtime/load_spec.rb b/spec/runtime/load_spec.rb
index c010f8f8e9..93c8073180 100644
--- a/spec/runtime/load_spec.rb
+++ b/spec/runtime/load_spec.rb
@@ -4,13 +4,6 @@ require "spec_helper"
describe "Bundler.load" do
before :each do
system_gems "rack-1.0.0"
- # clear memoized method results
- # TODO: Don't reset internal ivars
- Bundler.instance_eval do
- @load = nil
- @runtime = nil
- @definition = nil
- end
end
describe "with a gemfile" do
diff --git a/spec/support/builders.rb b/spec/support/builders.rb
index 16ced2b920..0b660f12f5 100644
--- a/spec/support/builders.rb
+++ b/spec/support/builders.rb
@@ -505,6 +505,10 @@ module Spec
@spec.add_runtime_dependency(name, requirements)
end
+ def development(name, requirements)
+ @spec.add_development_dependency(name, requirements)
+ end
+
def required_ruby_version=(*reqs)
@spec.required_ruby_version = *reqs
end