1
0
Fork 0
mirror of https://github.com/capistrano/capistrano synced 2023-03-27 23:21:18 -04:00

Improved test coverage for argument errors on callbacks

This commit is contained in:
Ryan McGeary 2008-05-10 19:08:36 -04:00
parent 192d8e41e4
commit 913e1094d5

View file

@ -97,6 +97,14 @@ class ConfigurationCallbacksTest < Test::Unit::TestCase
assert_equal %w(primary), @config.callbacks[:before].first.except
end
def test_on_without_tasks_or_block_should_raise_error
assert_raises(ArgumentError) { @config.on(:before) }
end
def test_on_with_both_tasks_and_block_should_raise_error
assert_raises(ArgumentError) { @config.on(:before, :first) { blah } }
end
def test_trigger_without_constraints_should_invoke_all_callbacks
task = stub(:fully_qualified_name => "any:old:thing")
@config.on(:before, :first, "second:third")