diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-04-04 22:23:44 +0200 |
---|---|---|
committer | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-04-11 13:25:59 +0200 |
commit | b9baa34673b96419410bd7c61d379bc8c89d798e (patch) | |
tree | acd392e65c87618a82afbd9d6051de4dddc6e387 /spec/commands/exec_spec.rb | |
parent | 4e96e9b7b921a2792f14e9127c7d9a0838832e57 (diff) | |
download | bundler-b9baa34673b96419410bd7c61d379bc8c89d798e.tar.gz |
Move on to bundler 3
* Drop bundler 1 stuff from tests.
* Move all feature flags to bundler 3 (like they are in 2-0-stable) and
get them tested.
Diffstat (limited to 'spec/commands/exec_spec.rb')
-rw-r--r-- | spec/commands/exec_spec.rb | 56 |
1 files changed, 4 insertions, 52 deletions
diff --git a/spec/commands/exec_spec.rb b/spec/commands/exec_spec.rb index bf1de25142..1d84669a75 100644 --- a/spec/commands/exec_spec.rb +++ b/spec/commands/exec_spec.rb @@ -621,17 +621,7 @@ RSpec.describe "bundle exec" do it_behaves_like "it runs" end - context "the executable is empty", :bundler => "< 2" do - let(:executable) { "" } - - let(:exit_code) { 0 } - let(:expected) { "#{path} is empty" } - let(:expected_err) { "" } - - it_behaves_like "it runs" - end - - context "the executable is empty", :bundler => "2" do + context "the executable is empty" do let(:executable) { "" } let(:exit_code) { 0 } @@ -640,18 +630,7 @@ RSpec.describe "bundle exec" do it_behaves_like "it runs" end - context "the executable raises", :bundler => "< 2" do - let(:executable) { super() << "\nraise 'ERROR'" } - let(:exit_code) { 1 } - let(:expected) { super() << "\nbundler: failed to load command: #{path} (#{path})" } - let(:expected_err) do - "RuntimeError: ERROR\n #{path}:10" + - (Bundler.current_ruby.ruby_18? ? "" : ":in `<top (required)>'") - end - it_behaves_like "it runs" - end - - context "the executable raises", :bundler => "2" do + context "the executable raises" do let(:executable) { super() << "\nraise 'ERROR'" } let(:exit_code) { 1 } let(:expected_err) do @@ -661,16 +640,7 @@ RSpec.describe "bundle exec" do it_behaves_like "it runs" end - context "the executable raises an error without a backtrace", :bundler => "< 2" do - let(:executable) { super() << "\nclass Err < Exception\ndef backtrace; end;\nend\nraise Err" } - let(:exit_code) { 1 } - let(:expected) { super() << "\nbundler: failed to load command: #{path} (#{path})" } - let(:expected_err) { "Err: Err" } - - it_behaves_like "it runs" - end - - context "the executable raises an error without a backtrace", :bundler => "2" do + context "the executable raises an error without a backtrace" do let(:executable) { super() << "\nclass Err < Exception\ndef backtrace; end;\nend\nraise Err" } let(:exit_code) { 1 } let(:expected_err) { "bundler: failed to load command: #{path} (#{path})\nErr: Err" } @@ -684,25 +654,7 @@ RSpec.describe "bundle exec" do it_behaves_like "it runs" end - context "when Bundler.setup fails", :bundler => "< 2" 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_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 - EOS - - it_behaves_like "it runs" - end - - context "when Bundler.setup fails", :bundler => "2" do + context "when Bundler.setup fails", :bundler => "< 3" do before do gemfile <<-G gem 'rack', '2' |