spec/spec_helper.rb in commander-4.5.0 vs spec/spec_helper.rb in commander-4.5.1

- old
+ new

@@ -12,14 +12,23 @@ # but without adding an `at_exit` hook, which interferes with exit code require 'commander' require 'commander/methods' # Mock terminal IO streams so we can spec against them - def mock_terminal @input = StringIO.new @output = StringIO.new HighLine.default_instance = HighLine.new(@input, @output) +end + +# Stub Kernel.abort +TestSystemExit = Class.new(RuntimeError) +module Commander + class Runner + def abort(message) + fail TestSystemExit, message + end + end end # Create test command for usage within several specs def create_test_command