test/unit/test_runner_tests.rb in qs-0.6.1 vs test/unit/test_runner_tests.rb in qs-0.7.0

- old
+ new

@@ -37,11 +37,11 @@ @runner = @runner_class.new(@handler_class, @args) @handler = @runner.handler end subject{ @runner } - should have_imeths :run + should have_imeths :halted?, :run should "know its standard args" do assert_equal @args[:logger], subject.logger assert_equal @args[:message], subject.message assert_equal @args[:params], subject.params @@ -67,9 +67,20 @@ assert_nil @handler.run_called end should "not call its handler's after callbacks" do assert_nil @handler.after_called + end + + should "not be halted by default" do + assert_false subject.halted? + end + + should "not call `run` on its handler if halted when run" do + catch(:halt){ subject.halt } + assert_true subject.halted? + subject.run + assert_nil @handler.run_called end should "stringify and encode the params passed to it" do key, value = Factory.string.to_sym, Factory.string params = {