summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2016-05-31 21:22:09 -0700
committerAndre Arko <andre@arko.net>2016-05-31 21:22:09 -0700
commit19c52bc9b980949374e8d583ab0fdd7acfdcf33d (patch)
treef87b46911635b108a033acc05b7e5d7057cb91d8
parentdd063ad4e3b9ddb7f24a1b23b71919936546afb4 (diff)
downloadbundler-19c52bc9b980949374e8d583ab0fdd7acfdcf33d.tar.gz
ensure files exist before looking for them
-rw-r--r--spec/bundler/shared_helpers_spec.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/spec/bundler/shared_helpers_spec.rb b/spec/bundler/shared_helpers_spec.rb
index 38110e43e3..9ab6a86252 100644
--- a/spec/bundler/shared_helpers_spec.rb
+++ b/spec/bundler/shared_helpers_spec.rb
@@ -111,10 +111,11 @@ describe Bundler::SharedHelpers do
end
context "ENV['BUNDLE_GEMFILE'] set" do
- before { ENV["BUNDLE_GEMFILE"] = "/path/Gemfile" }
-
it "returns ENV['BUNDLE_GEMFILE']" do
- expect(subject.in_bundle?).to eq("/path/Gemfile")
+ ENV["BUNDLE_GEMFILE"] = "./Gemfile"
+ expected_gemfile = Pathname.new(ENV["BUNDLE_GEMFILE"]).expand_path
+ expected_gemfile.write("")
+ expect(subject.in_bundle?).to eq(expected_gemfile)
end
end