From db2bcee891805a25c8541b4f455006b0562ffa77 Mon Sep 17 00:00:00 2001 From: rohit Date: Tue, 2 Oct 2012 17:49:43 +0530 Subject: [PATCH] fix a few warnings that show up while running specs --- lib/bundler/definition.rb | 2 +- spec/cache/git_spec.rb | 8 +++----- spec/runtime/with_clean_env_spec.rb | 2 -- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb index e0b3e5cedda..e73bc3b6666 100644 --- a/lib/bundler/definition.rb +++ b/lib/bundler/definition.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" \ diff --git a/spec/cache/git_spec.rb b/spec/cache/git_spec.rb index 71400f45a49..480f847f22d 100644 --- a/spec/cache/git_spec.rb +++ b/spec/cache/git_spec.rb @@ -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 \ No newline at end of file +end diff --git a/spec/runtime/with_clean_env_spec.rb b/spec/runtime/with_clean_env_spec.rb index c325fe85dc5..0b5cc766165 100644 --- a/spec/runtime/with_clean_env_spec.rb +++ b/spec/runtime/with_clean_env_spec.rb @@ -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"