From a19fbb417b54f0456b02bea295efd310761f6b86 Mon Sep 17 00:00:00 2001 From: Daniel Pittman Date: Fri, 8 Apr 2011 15:06:37 -0700 Subject: 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 --- spec/unit/application/faces_base_spec.rb | 7 +++++++ 1 file changed, 7 insertions(+) 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 -- cgit