diff options
Diffstat (limited to 'spec/commands/exec_spec.rb')
-rw-r--r-- | spec/commands/exec_spec.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/spec/commands/exec_spec.rb b/spec/commands/exec_spec.rb index 29f5927c14..e2ae0aabbb 100644 --- a/spec/commands/exec_spec.rb +++ b/spec/commands/exec_spec.rb @@ -395,7 +395,7 @@ describe "bundle exec" do subject { bundle "exec #{path} arg1 arg2", :expect_err => true } shared_examples_for "it runs" do - it "like a normally executed executable like a normally executed executable" do + it "like a normally executed executable" do subject expect(exitstatus).to eq(exit_code) if exitstatus expect(err).to eq(expected_err) @@ -450,5 +450,12 @@ describe "bundle exec" do it_behaves_like "it runs" end + + context "when the executable exits non-zero via at_exit" do + let(:executable) { super() + "\n\nat_exit { $! ? raise($!) : exit(1) }" } + let(:exit_code) { 1 } + + it_behaves_like "it runs" + end end end |