summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2016-06-01 00:22:37 -0700
committerAndre Arko <andre@arko.net>2016-06-01 00:22:37 -0700
commit9e3227d04cc36bcc1c433755f492b2c4065c5f46 (patch)
treed429326c0752bb20bcad83a47ea3020b0b94672c
parent424522d9af9022b8728e92bd3f52a77a160a4a24 (diff)
downloadbundler-9e3227d04cc36bcc1c433755f492b2c4065c5f46.tar.gz
match up the specs with BUNDLE_GEMFILE handling
-rw-r--r--spec/bundler/shared_helpers_spec.rb14
1 files changed, 6 insertions, 8 deletions
diff --git a/spec/bundler/shared_helpers_spec.rb b/spec/bundler/shared_helpers_spec.rb
index 9ab6a86252..e08b818a34 100644
--- a/spec/bundler/shared_helpers_spec.rb
+++ b/spec/bundler/shared_helpers_spec.rb
@@ -14,10 +14,9 @@ describe Bundler::SharedHelpers do
describe "#default_gemfile" do
context "Gemfile is present" do
it "returns the Gemfile path" do
- ENV["BUNDLE_GEMFILE"] = "./Gemfile"
- expected_gemfile = Pathname.new(ENV["BUNDLE_GEMFILE"]).expand_path
- expected_gemfile.write("")
- expect(subject.default_gemfile).to eq(expected_gemfile)
+ expected = Pathname.pwd.join("gems.rb")
+ expected.write("")
+ expect(subject.default_gemfile).to eq(expected)
end
end
@@ -112,10 +111,9 @@ describe Bundler::SharedHelpers do
context "ENV['BUNDLE_GEMFILE'] set" do
it "returns ENV['BUNDLE_GEMFILE']" do
- ENV["BUNDLE_GEMFILE"] = "./Gemfile"
- expected_gemfile = Pathname.new(ENV["BUNDLE_GEMFILE"]).expand_path
- expected_gemfile.write("")
- expect(subject.in_bundle?).to eq(expected_gemfile)
+ ENV["BUNDLE_GEMFILE"] = "Gemfile"
+ File.write(ENV["BUNDLE_GEMFILE"], "")
+ expect(subject.in_bundle?).to eq(ENV["BUNDLE_GEMFILE"])
end
end