diff options
Diffstat (limited to 'spec/bundler/commands/exec_spec.rb')
-rw-r--r-- | spec/bundler/commands/exec_spec.rb | 41 |
1 files changed, 3 insertions, 38 deletions
diff --git a/spec/bundler/commands/exec_spec.rb b/spec/bundler/commands/exec_spec.rb index a08f2b6fe8..76841dcff6 100644 --- a/spec/bundler/commands/exec_spec.rb +++ b/spec/bundler/commands/exec_spec.rb @@ -570,22 +570,7 @@ RSpec.describe "bundle exec" do it_behaves_like "it runs" end - context "the executable is empty", :bundler => "< 3" do - let(:executable) { "" } - - let(:exit_code) { 0 } - let(:expected) { "#{path} is empty" } - let(:expected_err) { "" } - if LessThanProc.with(RUBY_VERSION).call("1.9") - # Kernel#exec in ruby < 1.9 will raise Errno::ENOEXEC if the command content is empty, - # even if the command is set as an executable. - pending "Kernel#exec is different" - else - it_behaves_like "it runs" - end - end - - context "the executable is empty", :bundler => "3" do + context "the executable is empty" do let(:executable) { "" } let(:exit_code) { 0 } @@ -594,18 +579,7 @@ RSpec.describe "bundle exec" do it_behaves_like "it runs" end - context "the executable raises", :bundler => "< 3" 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 => "3" do + context "the executable raises" do let(:executable) { super() << "\nraise 'ERROR'" } let(:exit_code) { 1 } let(:expected_err) do @@ -615,16 +589,7 @@ RSpec.describe "bundle exec" do it_behaves_like "it runs" end - context "the executable raises an error without a backtrace", :bundler => "< 3" 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 => "3" 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" } |