diff options
author | Andre Arko <andre@arko.net> | 2012-12-08 00:06:18 -0800 |
---|---|---|
committer | Andre Arko <andre@arko.net> | 2012-12-08 00:13:00 -0800 |
commit | 0004c68540131d3d8b79f6b4d80226310d76757e (patch) | |
tree | 0171562eda2bb792e43ccef027dc6fba41a810c5 /spec/cache | |
parent | 37743f49940ba6a11f810da7ae709023b05b7f6f (diff) | |
download | bundler-0004c68540131d3d8b79f6b4d80226310d76757e.tar.gz |
clean up caching git gem specs, add test
Closes #2039
Diffstat (limited to 'spec/cache')
-rw-r--r-- | spec/cache/git_spec.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/cache/git_spec.rb b/spec/cache/git_spec.rb index b8aff447..14c3a7e4 100644 --- a/spec/cache/git_spec.rb +++ b/spec/cache/git_spec.rb @@ -165,5 +165,24 @@ end expect(out).not_to include("Your Gemfile contains path and git dependencies.") end + + it "evaluates gemspecs and writes them out" do + git = build_git "foo" + + # Insert a gemspec method that shells out + spec_lines = lib_path("foo-1.0/foo.gemspec").read.split("\n") + spec_lines.insert(-2, "s.description = `echo bob`") + update_git("foo"){ |s| s.write "foo.gemspec", spec_lines.join("\n") } + + install_gemfile <<-G + gem "foo", :git => '#{lib_path("foo-1.0")}' + G + bundle "#{cmd} --all" + + ref = git.ref_for("master", 11) + gemspec = bundled_app("vendor/cache/foo-1.0-#{ref}/foo.gemspec").read + expect(gemspec).to_not match("`echo bob`") + end + end end |