diff options
Diffstat (limited to 'spec/bundler/runtime/inline_spec.rb')
-rw-r--r-- | spec/bundler/runtime/inline_spec.rb | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/spec/bundler/runtime/inline_spec.rb b/spec/bundler/runtime/inline_spec.rb index 18ca246199..96a3fa09ae 100644 --- a/spec/bundler/runtime/inline_spec.rb +++ b/spec/bundler/runtime/inline_spec.rb @@ -67,7 +67,7 @@ RSpec.describe "bundler/inline#gemfile" do puts "success" RUBY - expect(err).to include "Could not find gem 'eleven'" + expect(last_command.stderr).to include "Could not find gem 'eleven'" expect(out).not_to include "success" script <<-RUBY @@ -90,7 +90,7 @@ RSpec.describe "bundler/inline#gemfile" do expect(out).to include("Installing activesupport") err.gsub! %r{.*lib/sinatra/base\.rb:\d+: warning: constant ::Fixnum is deprecated$}, "" err.strip! - expect(err).to lack_errors + expect(last_command.stderr).to be_empty expect(exitstatus).to be_zero if exitstatus end @@ -112,6 +112,19 @@ RSpec.describe "bundler/inline#gemfile" do expect(exitstatus).to be_zero if exitstatus end + it "has an option for quiet installation" do + script <<-RUBY, :artifice => "endpoint" + require 'bundler' + + gemfile(true, :quiet => true) do + source "https://notaserver.com" + gem "activesupport", :require => true + end + RUBY + + expect(out).to be_empty + end + it "raises an exception if passed unknown arguments" do script <<-RUBY gemfile(true, :arglebargle => true) do @@ -121,7 +134,7 @@ RSpec.describe "bundler/inline#gemfile" do puts "success" RUBY - expect(err).to include "Unknown options: arglebargle" + expect(last_command.stderr).to include "Unknown options: arglebargle" expect(out).not_to include "success" end @@ -152,7 +165,7 @@ RSpec.describe "bundler/inline#gemfile" do RUBY expect(out).to eq("1.0.0") - expect(err).to be_empty + expect(last_command.stderr).to be_empty expect(exitstatus).to be_zero if exitstatus end @@ -170,7 +183,7 @@ RSpec.describe "bundler/inline#gemfile" do RUBY expect(out).to eq("1.0.0\n2.0.0") - expect(err).to be_empty + expect(last_command.stderr).to be_empty expect(exitstatus).to be_zero if exitstatus end @@ -190,7 +203,7 @@ RSpec.describe "bundler/inline#gemfile" do RUBY expect(out).to eq("two\nfour") - expect(err).to be_empty + expect(last_command.stderr).to be_empty expect(exitstatus).to be_zero if exitstatus end @@ -227,7 +240,7 @@ RSpec.describe "bundler/inline#gemfile" do RUBY end - expect(err).to be_empty + expect(last_command.stderr).to be_empty expect(exitstatus).to be_zero if exitstatus end @@ -245,7 +258,7 @@ RSpec.describe "bundler/inline#gemfile" do RUBY end - expect(err).to be_empty + expect(last_command.stderr).to be_empty expect(exitstatus).to be_zero if exitstatus end |