diff options
Diffstat (limited to 'spec/commands')
-rw-r--r-- | spec/commands/exec_spec.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/commands/exec_spec.rb b/spec/commands/exec_spec.rb index 35b5eaea00..bf1de25142 100644 --- a/spec/commands/exec_spec.rb +++ b/spec/commands/exec_spec.rb @@ -693,6 +693,7 @@ RSpec.describe "bundle exec" do end let(:exit_code) { Bundler::GemNotFound.new.status_code } + let(:expected_err) { "" } let(:expected) { <<-EOS.strip } \e[31mCould not find gem 'rack (= 2)' in any of the gem sources listed in your Gemfile.\e[0m \e[33mRun `bundle install` to install missing gems.\e[0m @@ -712,6 +713,24 @@ RSpec.describe "bundle exec" do let(:exit_code) { Bundler::GemNotFound.new.status_code } let(:expected) { "" } let(:expected_err) { <<-EOS.strip } +\e[31mCould not find gem 'rack (= 2)' in any of the gem sources listed in your Gemfile.\e[0m +\e[33mRun `bundle install` to install missing gems.\e[0m + EOS + + it_behaves_like "it runs" + end + + context "when Bundler.setup fails", :bundler => "3" do + before do + gemfile <<-G + gem 'rack', '2' + G + ENV["BUNDLER_FORCE_TTY"] = "true" + end + + let(:exit_code) { Bundler::GemNotFound.new.status_code } + let(:expected) { "" } + let(:expected_err) { <<-EOS.strip } \e[31mCould not find gem 'rack (= 2)' in locally installed gems. The source contains 'rack' at: 1.0.0\e[0m \e[33mRun `bundle install` to install missing gems.\e[0m |