summaryrefslogtreecommitdiff
path: root/spec/commands/config_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/commands/config_spec.rb')
-rw-r--r--spec/commands/config_spec.rb11
1 files changed, 5 insertions, 6 deletions
diff --git a/spec/commands/config_spec.rb b/spec/commands/config_spec.rb
index ef580463e5..7a45dd0dd7 100644
--- a/spec/commands/config_spec.rb
+++ b/spec/commands/config_spec.rb
@@ -54,14 +54,13 @@ RSpec.describe ".bundle/config" do
it "can provide a relative path with the environment variable" do
FileUtils.mkdir_p bundled_app("omg")
- Dir.chdir bundled_app("omg")
ENV["BUNDLE_APP_CONFIG"] = "../foo"
- bundle "install", forgotten_command_line_options(:path => "vendor/bundle")
+ bundle "install", forgotten_command_line_options(:path => "vendor/bundle").merge(:dir => bundled_app("omg"))
expect(bundled_app(".bundle")).not_to exist
expect(bundled_app("../foo/config")).to exist
- expect(the_bundle).to include_gems "rack 1.0.0"
+ expect(the_bundle).to include_gems "rack 1.0.0", :dir => bundled_app("omg")
end
end
@@ -138,7 +137,7 @@ RSpec.describe ".bundle/config" do
it "expands the path at time of setting" do
bundle "config set --global local.foo .."
run "puts Bundler.settings['local.foo']"
- expect(out).to eq(File.expand_path(Dir.pwd + "/.."))
+ expect(out).to eq(File.expand_path(bundled_app.to_s + "/.."))
end
it "saves with parseable option" do
@@ -205,7 +204,7 @@ RSpec.describe ".bundle/config" do
it "expands the path at time of setting" do
bundle "config set --local local.foo .."
run "puts Bundler.settings['local.foo']"
- expect(out).to eq(File.expand_path(Dir.pwd + "/.."))
+ expect(out).to eq(File.expand_path(bundled_app.to_s + "/.."))
end
it "can be deleted with parseable option" do
@@ -484,7 +483,7 @@ RSpec.describe "setting gemfile via config" do
G
bundle "config set --local gemfile #{bundled_app("NotGemfile")}"
- expect(File.exist?(".bundle/config")).to eq(true)
+ expect(File.exist?(bundled_app(".bundle/config"))).to eq(true)
bundle "config list"
expect(out).to include("NotGemfile")