summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorHomu <homu@barosl.com>2016-02-27 07:48:21 +0900
committerHomu <homu@barosl.com>2016-02-27 07:48:21 +0900
commitf819834287274aa78d0fd03ac5685cf543cd68e4 (patch)
treefb8f1c68db281827f5d468aa3351f92995617c61 /spec
parent4786adb75e2e2fec2dde60618b53132ef7b03cdb (diff)
parent49744f57a175dc5d71b380c17d460cbb9a71b046 (diff)
downloadbundler-f819834287274aa78d0fd03ac5685cf543cd68e4.tar.gz
Auto merge of #4304 - mobilutz:master, r=indirect
Bundle Viz : Options without can have multiple values I wanted to only have one 'environment' when calling `bundle viz`. There is the options `--without`, but passing two arguments or some other form of array was not possible. Maybe this is not the best solution. But it works for me. The format for the option is `--without=development,test`.
Diffstat (limited to 'spec')
-rw-r--r--spec/commands/viz_spec.rb34
1 files changed, 34 insertions, 0 deletions
diff --git a/spec/commands/viz_spec.rb b/spec/commands/viz_spec.rb
index c680568899..20dc9175d9 100644
--- a/spec/commands/viz_spec.rb
+++ b/spec/commands/viz_spec.rb
@@ -32,4 +32,38 @@ describe "bundle viz", :ruby => "1.9.3", :if => Bundler.which("dot") do
bundle "viz", :env => { "RUBYOPT" => "-I #{graphviz_lib}" }
expect(out).to include("gem_graph.png")
end
+
+ context "--without option" do
+ it "one group" do
+ install_gemfile <<-G
+ source "file://#{gem_repo1}"
+ gem "activesupport"
+
+ group :rails do
+ gem "rails"
+ end
+ G
+
+ bundle "viz --without=rails", :env => { "RUBYOPT" => "-I #{graphviz_lib}" }
+ expect(out).to include("gem_graph.png")
+ end
+
+ it "two groups" do
+ install_gemfile <<-G
+ source "file://#{gem_repo1}"
+ gem "activesupport"
+
+ group :rack do
+ gem "rack"
+ end
+
+ group :rails do
+ gem "rails"
+ end
+ G
+
+ bundle "viz --without=rails:rack", :env => { "RUBYOPT" => "-I #{graphviz_lib}" }
+ expect(out).to include("gem_graph.png")
+ end
+ end
end