Permalink
Browse files

fix a few warnings that show up while running specs

  • Loading branch information...
1 parent 72502c9 commit db2bcee891805a25c8541b4f455006b0562ffa77 @rohit committed Oct 2, 2012
Showing with 4 additions and 8 deletions.
  1. +1 −1 lib/bundler/definition.rb
  2. +3 −5 spec/cache/git_spec.rb
  3. +0 −2 spec/runtime/with_clean_env_spec.rb
@@ -235,7 +235,7 @@ def lock(file)
end
File.open(file, 'wb'){|f| f.puts(contents) }
- rescue Errno::EACCES => e
+ rescue Errno::EACCES
raise Bundler::InstallError,
"There was an error while trying to write to Gemfile.lock. It is likely that \n" \
"you need to allow write permissions for the file at path: \n" \
@@ -142,8 +142,7 @@
end
it "displays warning message when detecting git repo in Gemfile" do
- git = build_git "foo"
- ref = git.ref_for("master", 11)
+ build_git "foo"
install_gemfile <<-G
gem "foo", :git => '#{lib_path("foo-1.0")}'
@@ -155,8 +154,7 @@
end
it "does not display warning message if cache_all is set in bundle config" do
- git = build_git "foo"
- ref = git.ref_for("master", 11)
+ build_git "foo"
install_gemfile <<-G
gem "foo", :git => '#{lib_path("foo-1.0")}'
@@ -168,4 +166,4 @@
out.should_not include("Your Gemfile contains path and git dependencies.")
end
end
-end
+end
@@ -29,8 +29,6 @@
gemfile ""
bundle "install --path vendor/bundle"
- gem_path = ENV['GEM_PATH']
-
code = "Bundler.with_clean_env do;" +
" print ENV['GEM_PATH'] != '';" +
"end"

0 comments on commit db2bcee

Please sign in to comment.