diff options
Diffstat (limited to 'spec/bundler/commands/config_spec.rb')
-rw-r--r-- | spec/bundler/commands/config_spec.rb | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/spec/bundler/commands/config_spec.rb b/spec/bundler/commands/config_spec.rb index d7fb5107de..f1bc657ffb 100644 --- a/spec/bundler/commands/config_spec.rb +++ b/spec/bundler/commands/config_spec.rb @@ -91,7 +91,7 @@ RSpec.describe ".bundle/config" do end it "can also be set explicitly" do - bundle! "config set --global foo global" + bundle "config set --global foo global" run! "puts Bundler.settings[:foo]" expect(out).to eq("global") end @@ -401,42 +401,42 @@ E describe "subcommands" do it "list" do - bundle! "config list" + bundle "config list" expect(out).to eq "Settings are listed in order of priority. The top value will be used.\nspec_run\nSet via BUNDLE_SPEC_RUN: \"true\"" - bundle! "config list", :parseable => true + bundle "config list", :parseable => true expect(out).to eq "spec_run=true" end it "get" do ENV["BUNDLE_BAR"] = "bar_val" - bundle! "config get foo" + bundle "config get foo" expect(out).to eq "Settings for `foo` in order of priority. The top value will be used\nYou have not configured a value for `foo`" ENV["BUNDLE_FOO"] = "foo_val" - bundle! "config get foo --parseable" + bundle "config get foo --parseable" expect(out).to eq "foo=foo_val" - bundle! "config get foo" + bundle "config get foo" expect(out).to eq "Settings for `foo` in order of priority. The top value will be used\nSet via BUNDLE_FOO: \"foo_val\"" end it "set" do - bundle! "config set foo 1" + bundle "config set foo 1" expect(out).to eq "" - bundle! "config set --local foo 2" + bundle "config set --local foo 2" expect(out).to eq "" - bundle! "config set --global foo 3" + bundle "config set --global foo 3" expect(out).to eq "Your application has set foo to \"2\". This will override the global value you are currently setting" - bundle! "config set --parseable --local foo 4" + bundle "config set --parseable --local foo 4" expect(out).to eq "foo=4" - bundle! "config set --local foo 4.1" + bundle "config set --local foo 4.1" expect(out).to eq "You are replacing the current local value of foo, which is currently \"4\"" bundle "config set --global --local foo 5", :raise_on_error => false @@ -445,39 +445,39 @@ E end it "unset" do - bundle! "config unset foo" + bundle "config unset foo" expect(out).to eq "" - bundle! "config set foo 1" - bundle! "config unset foo --parseable" + bundle "config set foo 1" + bundle "config unset foo --parseable" expect(out).to eq "" - bundle! "config set --local foo 1" - bundle! "config set --global foo 2" + bundle "config set --local foo 1" + bundle "config set --global foo 2" - bundle! "config unset foo" + bundle "config unset foo" expect(out).to eq "" - expect(bundle!("config get foo")).to eq "Settings for `foo` in order of priority. The top value will be used\nYou have not configured a value for `foo`" + expect(bundle("config get foo")).to eq "Settings for `foo` in order of priority. The top value will be used\nYou have not configured a value for `foo`" - bundle! "config set --local foo 1" - bundle! "config set --global foo 2" + bundle "config set --local foo 1" + bundle "config set --global foo 2" - bundle! "config unset foo --local" + bundle "config unset foo --local" expect(out).to eq "" - expect(bundle!("config get foo")).to eq "Settings for `foo` in order of priority. The top value will be used\nSet for the current user (#{home(".bundle/config")}): \"2\"" - bundle! "config unset foo --global" + expect(bundle("config get foo")).to eq "Settings for `foo` in order of priority. The top value will be used\nSet for the current user (#{home(".bundle/config")}): \"2\"" + bundle "config unset foo --global" expect(out).to eq "" - expect(bundle!("config get foo")).to eq "Settings for `foo` in order of priority. The top value will be used\nYou have not configured a value for `foo`" + expect(bundle("config get foo")).to eq "Settings for `foo` in order of priority. The top value will be used\nYou have not configured a value for `foo`" - bundle! "config set --local foo 1" - bundle! "config set --global foo 2" + bundle "config set --local foo 1" + bundle "config set --global foo 2" - bundle! "config unset foo --global" + bundle "config unset foo --global" expect(out).to eq "" - expect(bundle!("config get foo")).to eq "Settings for `foo` in order of priority. The top value will be used\nSet for your local app (#{bundled_app(".bundle/config")}): \"1\"" - bundle! "config unset foo --local" + expect(bundle("config get foo")).to eq "Settings for `foo` in order of priority. The top value will be used\nSet for your local app (#{bundled_app(".bundle/config")}): \"1\"" + bundle "config unset foo --local" expect(out).to eq "" - expect(bundle!("config get foo")).to eq "Settings for `foo` in order of priority. The top value will be used\nYou have not configured a value for `foo`" + expect(bundle("config get foo")).to eq "Settings for `foo` in order of priority. The top value will be used\nYou have not configured a value for `foo`" bundle "config unset foo --local --global", :raise_on_error => false expect(last_command).to be_failure |