diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-02-07 14:45:59 +0100 |
---|---|---|
committer | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-02-14 00:45:09 +0100 |
commit | dac69e7b21cb05ad9df27941aab004abcb80b4ef (patch) | |
tree | 01aa5e4bc46d04803bc7cbf5ea3271202640a1cc /spec/lock | |
parent | 1cc82538dbd189a56fc5bdeed9ef5eb325b5bb1c (diff) | |
download | bundler-dac69e7b21cb05ad9df27941aab004abcb80b4ef.tar.gz |
Split stderr and stdout in specs
Diffstat (limited to 'spec/lock')
-rw-r--r-- | spec/lock/lockfile_bundler_1_spec.rb | 12 | ||||
-rw-r--r-- | spec/lock/lockfile_spec.rb | 10 |
2 files changed, 11 insertions, 11 deletions
diff --git a/spec/lock/lockfile_bundler_1_spec.rb b/spec/lock/lockfile_bundler_1_spec.rb index 77c4e2c847..59cc8fe807 100644 --- a/spec/lock/lockfile_bundler_1_spec.rb +++ b/spec/lock/lockfile_bundler_1_spec.rb @@ -181,7 +181,7 @@ RSpec.describe "the lockfile format", :bundler => "< 2" do warning_message = "the running version of Bundler (9999999.0.0) is older " \ "than the version that created the lockfile (9999999.1.0)" - expect(out.scan(warning_message).size).to eq(1) + expect(last_command.stderr.scan(warning_message).size).to eq(1) lockfile_should_be <<-G GEM @@ -263,7 +263,7 @@ RSpec.describe "the lockfile format", :bundler => "< 2" do G expect(exitstatus > 0) if exitstatus - expect(out).to include("You must use Bundler 9999999 or greater with this lockfile.") + expect(err).to include("You must use Bundler 9999999 or greater with this lockfile.") end it "warns when updating bundler major version" do @@ -291,7 +291,7 @@ RSpec.describe "the lockfile format", :bundler => "< 2" do G end - expect(out).to include("Warning: the lockfile is being updated to Bundler " \ + expect(err).to include("Warning: the lockfile is being updated to Bundler " \ "9999999, after which you will be unable to return to Bundler 1.") lockfile_should_be <<-G @@ -1123,7 +1123,7 @@ RSpec.describe "the lockfile format", :bundler => "< 2" do G expect(bundled_app("Gemfile.lock")).not_to exist - expect(out).to include "rack (= 1.0) and rack (= 1.1)" + expect(err).to include "rack (= 1.0) and rack (= 1.1)" end it "raises if two different sources are used" do @@ -1134,7 +1134,7 @@ RSpec.describe "the lockfile format", :bundler => "< 2" do G expect(bundled_app("Gemfile.lock")).not_to exist - expect(out).to include "rack (>= 0) should come from an unspecified source and git://hubz.com (at master)" + expect(err).to include "rack (>= 0) should come from an unspecified source and git://hubz.com (at master)" end it "works correctly with multiple version dependencies" do @@ -1282,7 +1282,7 @@ RSpec.describe "the lockfile format", :bundler => "< 2" do gem "rack_middleware" G - expect(out).to include("Downloading rack_middleware-1.0 revealed dependencies not in the API or the lockfile (#{Gem::Dependency.new("rack", "= 0.9.1")})."). + expect(err).to include("Downloading rack_middleware-1.0 revealed dependencies not in the API or the lockfile (#{Gem::Dependency.new("rack", "= 0.9.1")})."). and include("Either installing with `--full-index` or running `bundle update rack_middleware` should fix the problem.") end diff --git a/spec/lock/lockfile_spec.rb b/spec/lock/lockfile_spec.rb index 691bb2a6ed..a77ce83f9f 100644 --- a/spec/lock/lockfile_spec.rb +++ b/spec/lock/lockfile_spec.rb @@ -262,7 +262,7 @@ RSpec.describe "the lockfile format", :bundler => "2" do G expect(last_command).to be_failure - expect(out).to include("You must use Bundler 9999999 or greater with this lockfile.") + expect(err).to include("You must use Bundler 9999999 or greater with this lockfile.") end it "warns when updating bundler major version" do @@ -290,7 +290,7 @@ RSpec.describe "the lockfile format", :bundler => "2" do G end - expect(out).to include("Warning: the lockfile is being updated to Bundler " \ + expect(err).to include("Warning: the lockfile is being updated to Bundler " \ "9999999, after which you will be unable to return to Bundler 1.") lockfile_should_be <<-G @@ -1162,7 +1162,7 @@ RSpec.describe "the lockfile format", :bundler => "2" do G expect(bundled_app("Gemfile.lock")).not_to exist - expect(out).to include "rack (= 1.0) and rack (= 1.1)" + expect(err).to include "rack (= 1.0) and rack (= 1.1)" end it "raises if two different sources are used" do @@ -1173,7 +1173,7 @@ RSpec.describe "the lockfile format", :bundler => "2" do G expect(bundled_app("Gemfile.lock")).not_to exist - expect(out).to include "rack (>= 0) should come from an unspecified source and git://hubz.com (at master)" + expect(err).to include "rack (>= 0) should come from an unspecified source and git://hubz.com (at master)" end it "works correctly with multiple version dependencies" do @@ -1321,7 +1321,7 @@ RSpec.describe "the lockfile format", :bundler => "2" do gem "rack_middleware" G - expect(out).to include("Downloading rack_middleware-1.0 revealed dependencies not in the API or the lockfile (#{Gem::Dependency.new("rack", "= 0.9.1")})."). + expect(err).to include("Downloading rack_middleware-1.0 revealed dependencies not in the API or the lockfile (#{Gem::Dependency.new("rack", "= 0.9.1")})."). and include("Either installing with `--full-index` or running `bundle update rack_middleware` should fix the problem.") end |