test/unit/message_handler_tests.rb in qs-0.6.1 vs test/unit/message_handler_tests.rb in qs-0.7.0
- old
+ new
@@ -209,11 +209,11 @@
desc "and run"
setup do
@handler.qs_run
end
- should "call `run!` and it's callbacks" do
+ should "call `run!` and its callbacks" do
assert_equal 6, subject.first_before_run_call_order
assert_equal 7, subject.second_before_run_call_order
assert_equal 8, subject.run_call_order
assert_equal 9, subject.first_after_run_call_order
assert_equal 10, subject.second_after_run_call_order
@@ -234,13 +234,26 @@
should "call to the runner for its params" do
stub_runner_with_something_for(:params)
assert_equal @runner.params, subject.instance_eval{ params }
end
+ should "call to the runner for its halt helper" do
+ capture_runner_meth_args_for(:halt)
+ subject.instance_eval{ halt }
+
+ assert_equal [], @meth_args
+ end
+
private
def stub_runner_with_something_for(meth)
Assert.stub(@runner, meth){ @something }
+ end
+
+ def capture_runner_meth_args_for(meth)
+ Assert.stub(@runner, meth) do |*args|
+ @meth_args = args
+ end
end
end
class TestMessageHandler