summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Eichelberger <dduugg@gmail.com>2018-10-29 12:26:07 -0700
committerDouglas Eichelberger <dduugg@gmail.com>2018-10-29 13:09:52 -0700
commitf20939e4b303640d05d1c2204d3e030c7ce9d5e3 (patch)
tree01ac214d69fe1e0fa2ad7a00c3ec92e20390c376
parentec535a09549ba86c2e754b5f3865dfb8e7616792 (diff)
downloadbundler-f20939e4b303640d05d1c2204d3e030c7ce9d5e3.tar.gz
Add test
-rw-r--r--spec/commands/remove_spec.rb24
1 files changed, 24 insertions, 0 deletions
diff --git a/spec/commands/remove_spec.rb b/spec/commands/remove_spec.rb
index 37594b1ece..daed91c034 100644
--- a/spec/commands/remove_spec.rb
+++ b/spec/commands/remove_spec.rb
@@ -140,6 +140,30 @@ RSpec.describe "bundle remove" do
end
end
+ context "when gem to be removed is outside block" do
+ it "does not modify group" do
+ gemfile <<-G
+ source "file://#{gem_repo1}"
+
+ gem "rack"
+ group :test do
+ gem "coffee-script-source"
+ end
+ G
+
+ bundle! "remove rack"
+
+ expect(out).to include("rack was removed.")
+ gemfile_should_be <<-G
+ source "file://#{gem_repo1}"
+
+ group :test do
+ gem "coffee-script-source"
+ end
+ G
+ end
+ end
+
context "when an empty block is also present" do
it "removes all empty blocks" do
gemfile <<-G