diff --git a/lib/thor/base.rb b/lib/thor/base.rb index 2e7fc6a64..4a98bba40 100644 --- a/lib/thor/base.rb +++ b/lib/thor/base.rb @@ -644,7 +644,7 @@ def from_superclass(method, default = nil) # A flag that makes the process exit with status 1 if any error happens. def exit_on_failure? - false + true end # diff --git a/spec/helper.rb b/spec/helper.rb index fa3bd0080..96005a3c1 100644 --- a/spec/helper.rb +++ b/spec/helper.rb @@ -44,6 +44,10 @@ ARGV.replace [] end + config.before(:each) do + allow_any_instance_of(Thor::Base::ClassMethods).to receive(:exit_on_failure?).and_return(false) + end + config.expect_with :rspec do |c| c.syntax = :expect end