summaryrefslogtreecommitdiff
path: root/spec/bundler/shared_helpers_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/bundler/shared_helpers_spec.rb')
-rw-r--r--spec/bundler/shared_helpers_spec.rb18
1 files changed, 10 insertions, 8 deletions
diff --git a/spec/bundler/shared_helpers_spec.rb b/spec/bundler/shared_helpers_spec.rb
index 880724180f..c17f3b8582 100644
--- a/spec/bundler/shared_helpers_spec.rb
+++ b/spec/bundler/shared_helpers_spec.rb
@@ -30,6 +30,16 @@ RSpec.describe Bundler::SharedHelpers do
)
end
end
+
+ context "Gemfile is not an absolute path" do
+ before { ENV["BUNDLE_GEMFILE"] = "Gemfile" }
+
+ let(:expected_gemfile_path) { Pathname.new("Gemfile").expand_path }
+
+ it "returns the Gemfile path" do
+ expect(subject.default_gemfile).to eq(expected_gemfile_path)
+ end
+ end
end
describe "#default_lockfile" do
@@ -121,14 +131,6 @@ RSpec.describe Bundler::SharedHelpers do
end
end
- context "ENV['BUNDLE_GEMFILE'] is set without an absolute path" do
- before { ENV["BUNDLE_GEMFILE"] = "Gemfile" }
-
- it "returns path of the bundle Gemfile" do
- expect(subject.in_bundle?).to eq("#{bundled_app}/Gemfile")
- end
- end
-
context "ENV['BUNDLE_GEMFILE'] not set" do
before { ENV["BUNDLE_GEMFILE"] = nil }