diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-04-11 23:09:33 +0200 |
---|---|---|
committer | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-04-12 10:44:54 +0200 |
commit | eb46c21d28193e1fc40aad1ab1316479f59f4515 (patch) | |
tree | 6f6a6ca1a853d7b29571d38f1e283624bb30728d /spec/commands/newgem_spec.rb | |
parent | bb0e13d6070a3082b7ef59cd8c7284f988335e91 (diff) | |
download | bundler-eb46c21d28193e1fc40aad1ab1316479f59f4515.tar.gz |
Unify stderr helpers
Diffstat (limited to 'spec/commands/newgem_spec.rb')
-rw-r--r-- | spec/commands/newgem_spec.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/commands/newgem_spec.rb b/spec/commands/newgem_spec.rb index 0d1058ad11..104d616d24 100644 --- a/spec/commands/newgem_spec.rb +++ b/spec/commands/newgem_spec.rb @@ -770,22 +770,22 @@ RSpec.describe "bundle gem" do it "fails gracefully with a ." do bundle "gem foo.gemspec" - expect(last_command.bundler_err).to end_with("Invalid gem name foo.gemspec -- `Foo.gemspec` is an invalid constant name") + expect(err).to end_with("Invalid gem name foo.gemspec -- `Foo.gemspec` is an invalid constant name") end it "fails gracefully with a ^" do bundle "gem ^" - expect(last_command.bundler_err).to end_with("Invalid gem name ^ -- `^` is an invalid constant name") + expect(err).to end_with("Invalid gem name ^ -- `^` is an invalid constant name") end it "fails gracefully with a space" do bundle "gem 'foo bar'" - expect(last_command.bundler_err).to end_with("Invalid gem name foo bar -- `Foo bar` is an invalid constant name") + expect(err).to end_with("Invalid gem name foo bar -- `Foo bar` is an invalid constant name") end it "fails gracefully when multiple names are passed" do bundle "gem foo bar baz" - expect(last_command.bundler_err).to eq(<<-E.strip) + expect(err).to eq(<<-E.strip) ERROR: "bundle gem" was called with arguments ["foo", "bar", "baz"] Usage: "bundle gem NAME [OPTIONS]" E @@ -876,7 +876,7 @@ Usage: "bundle gem NAME [OPTIONS]" FileUtils.touch("conflict-foobar") end bundle "gem conflict-foobar" - expect(last_command.bundler_err).to include("Errno::ENOTDIR") + expect(err).to include("Errno::ENOTDIR") expect(exitstatus).to eql(32) if exitstatus end end |