summaryrefslogtreecommitdiff
path: root/spec/commands/clean_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/commands/clean_spec.rb')
-rw-r--r--spec/commands/clean_spec.rb26
1 files changed, 26 insertions, 0 deletions
diff --git a/spec/commands/clean_spec.rb b/spec/commands/clean_spec.rb
index 13eebd3baa..7f9f84c104 100644
--- a/spec/commands/clean_spec.rb
+++ b/spec/commands/clean_spec.rb
@@ -863,4 +863,30 @@ RSpec.describe "bundle clean" do
expect(very_simple_binary_extensions_dir).not_to exist
end
+
+ it "keeps git extension directories when excluded by group", :ruby_repo do
+ build_git "very_simple_git_binary", &:add_c_extension
+
+ revision = revision_for(lib_path("very_simple_git_binary-1.0"))
+ short_revision = revision[0..11]
+
+ gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
+
+ group :development do
+ gem "very_simple_git_binary", :git => "#{lib_path("very_simple_git_binary-1.0")}", :ref => "#{revision}"
+ end
+ G
+
+ bundle :lock
+ bundle "config set without development"
+ bundle "config set path vendor/bundle"
+ bundle! "install"
+ bundle! :clean
+
+ very_simple_binary_extensions_dir =
+ Pathname.glob("#{vendored_gems}/bundler/gems/extensions/*/*/very_simple_git_binary-1.0-#{short_revision}").first
+
+ expect(very_simple_binary_extensions_dir).to be_nil
+ end
end