Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Commit

Permalink
clean: add test for not removing git extensions artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
sirupsen committed Oct 6, 2015
1 parent a9dfc80 commit b4227f4
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions spec/commands/clean_spec.rb
Expand Up @@ -613,4 +613,26 @@ def should_not_have_gems(*gems)
should_have_gems "thin-1.0", "rack-1.0.0", "weakling-0.0.3"
should_not_have_gems "foo-1.0"
end

it "doesn't remove extensions artifacts from bundled git gems after clean", :rubygems => "2.2" do
build_git "very_simple_git_binary" do |s|
s.add_c_extension
end

revision = revision_for(lib_path("very_simple_git_binary-1.0"))

gemfile <<-G
source "file://#{gem_repo1}"
gem "very_simple_git_binary", :git => "#{lib_path("very_simple_git_binary-1.0")}", :ref => "#{revision}"
G

bundle "install --path vendor/bundle"
bundle :clean

expect(out).to eq("")

expect(vendored_gems("bundler/gems/extensions")).to exist
expect(vendored_gems("bundler/gems/very_simple_git_binary-1.0-#{revision[0..11]}")).to exist
end
end

0 comments on commit b4227f4

Please sign in to comment.