diff options
author | Daniel Pittman <daniel@puppetlabs.com> | 2011-04-08 15:06:37 -0700 |
---|---|---|
committer | Daniel Pittman <daniel@puppetlabs.com> | 2011-04-08 15:17:55 -0700 |
commit | a19fbb417b54f0456b02bea295efd310761f6b86 (patch) | |
tree | ab45f40046fb2c45e2aa714455d8791c3aea0d07 | |
parent | f9a2ffd53054b67924790b0386cf74435497c3f1 (diff) | |
download | puppet-a19fbb417b54f0456b02bea295efd310761f6b86.tar.gz puppet-a19fbb417b54f0456b02bea295efd310761f6b86.tar.xz puppet-a19fbb417b54f0456b02bea295efd310761f6b86.zip |
maint: don't take over signal handling in tests...
We had a problem where we installed a signal handler during a :before block,
which wasn't stubbed, so ended up leaving that in place forever. Which bites.
We stub it out locally, which is ugly but functional.
Paired-With: Matt Robinson <matt@puppetlabs.com>
-rwxr-xr-x | spec/unit/application/faces_base_spec.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/unit/application/faces_base_spec.rb b/spec/unit/application/faces_base_spec.rb index 6d8815f44..6d8456612 100755 --- a/spec/unit/application/faces_base_spec.rb +++ b/spec/unit/application/faces_base_spec.rb @@ -59,6 +59,13 @@ describe Puppet::Application::FacesBase do describe "parsing the command line" do context "with just an action" do before :all do + # We have to stub Signal.trap to avoid a crazy mess where we take + # over signal handling and make it impossible to cancel the test + # suite run. + # + # It would be nice to fix this elsewhere, but it is actually hard to + # capture this in rspec 2.5 and all. :( --daniel 2011-04-08 + Signal.stubs(:trap) app.command_line.stubs(:args).returns %w{foo} app.preinit end |