aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorNathan Broadbent <nathan.f77@gmail.com>2013-07-13 17:31:48 +1200
committerNathan Broadbent <nathan.f77@gmail.com>2013-07-13 17:36:36 +1200
commit95d251ab40d7f7f35d636c7a87b63d028c8ff009 (patch)
tree81c530d91997b5ab0ff86ebbe3e85cf55c71d3e5 /spec
parentea4ae196a3c519781802a050248c6929ef4229b4 (diff)
downloadbundler-95d251ab40d7f7f35d636c7a87b63d028c8ff009.tar.gz
Allow `require: true` as an alias for `require: <name>`
Diffstat (limited to 'spec')
-rw-r--r--spec/runtime/require_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/runtime/require_spec.rb b/spec/runtime/require_spec.rb
index db72ff70..e1c93897 100644
--- a/spec/runtime/require_spec.rb
+++ b/spec/runtime/require_spec.rb
@@ -33,6 +33,10 @@ describe "Bundler.require" do
s.write "lib/seven.rb", "puts 'seven'"
end
+ build_lib "eight", "1.0.0" do |s|
+ s.write "lib/eight.rb", "puts 'eight'"
+ end
+
gemfile <<-G
path "#{lib_path}"
gem "one", :group => :bar, :require => %w(baz qux)
@@ -42,6 +46,7 @@ describe "Bundler.require" do
gem "five"
gem "six", :group => "string"
gem "seven", :group => :not
+ gem "eight", :require => true, :group => :require_true
G
end
@@ -69,6 +74,10 @@ describe "Bundler.require" do
# required in resolver order instead of gemfile order
run("Bundler.require(:not)")
expect(out.split("\n").sort).to eq(['seven', 'three'])
+
+ # test require: true
+ run "Bundler.require(:require_true)"
+ expect(out).to eq("eight")
end
it "allows requiring gems with non standard names explicitly" do