test/test_task.rb in god-0.7.22 vs test/test_task.rb in god-0.8.0
- old
+ new
@@ -59,23 +59,23 @@
# action
def test_action_should_send_string_commands_to_system
@task.foo = 'foo'
- Thread.current.stubs(:==).returns(true)
+ @task.driver.stubs(:in_driver_context?).returns(true)
@task.expects(:system).with('foo')
@task.action(:foo, nil)
end
def test_action_should_call_lambda_commands
@task.foo = lambda { }
- Thread.current.stubs(:==).returns(true)
+ @task.driver.stubs(:in_driver_context?).returns(true)
@task.foo.expects(:call)
@task.action(:foo, nil)
end
def test_action_should_raise_not_implemented_on_non_string_or_lambda_action
- Thread.current.stubs(:==).returns(true)
+ @task.driver.stubs(:in_driver_context?).returns(true)
assert_raise NotImplementedError do
@task.foo = 7
@task.action(:foo, nil)
end
end
\ No newline at end of file