diff options
author | Samuel Giddins <segiddins@segiddins.me> | 2016-04-14 19:29:44 -0500 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2016-04-14 22:40:20 -0500 |
commit | d928822a17fef3713fd9501fa7a73aa727d08822 (patch) | |
tree | 85f874e509b3ba1b70138c69e31e351eafd892b5 /spec/commands/exec_spec.rb | |
parent | 3a09448d8b060f2688dbc73bfa1eb08e1bd126f3 (diff) | |
download | bundler-seg-exec-load-at-exit.tar.gz |
[Exec] Allow executables to exit non-zero via at_exitseg-exec-load-at-exit
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 |