summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLorenzo Manacorda <lorenzo.manacorda@gmail.com>2015-09-16 17:07:44 +0200
committerLorenzo Manacorda <lorenzo.manacorda@gmail.com>2015-09-16 17:07:44 +0200
commit21da0627bd5425c540b954f9ca3ee218f003d5cc (patch)
treea2ab0aa88eca9bf6359fd7574b29a71929af2461
parente19b7eaece4f4dc23951bb56704d7a94c751b85e (diff)
downloadbundler-21da0627bd5425c540b954f9ca3ee218f003d5cc.tar.gz
group deprecated flag tests together
-rw-r--r--spec/commands/install_spec.rb41
1 files changed, 11 insertions, 30 deletions
diff --git a/spec/commands/install_spec.rb b/spec/commands/install_spec.rb
index b663426af7..16f13e3a57 100644
--- a/spec/commands/install_spec.rb
+++ b/spec/commands/install_spec.rb
@@ -380,39 +380,20 @@ describe "bundle install with gem sources" do
end
end
- describe "when using the --cache flag" do
+ describe "when using deprecated flags" do
it "prints an error and exits" do
- gemfile <<-G
- gem 'rack'
- G
-
- bundle "install --cache"
-
- expect(err).to include("Unknown switches '--cache'")
- end
- end
-
- describe "when using the --path flag" do
- it "prints an error and exits" do
- gemfile <<-G
- gem 'rack'
- G
-
- bundle "install --path vendor/bundle"
-
- expect(err).to include("Unknown switches '--path'")
- end
- end
-
- describe "when using the --system flag" do
- it "prints an error and exit" do
- gemfile <<-G
- gem 'rack'
- G
+ ["--cache",
+ "--path vendor/bundle",
+ "--system"
+ ].each do |flag|
+ gemfile <<-G
+ gem 'rack'
+ G
- bundle "install --system"
+ bundle "install #{flag}"
- expect(err).to include("Unknown switches '--system'")
+ expect(err).to include("Unknown switches '#{flag.split.first}'")
+ end
end
end