Permalink
Browse files

Add test for new_scope in multitask.

  • Loading branch information...
1 parent a5cc8d0 commit c95fbc76814d4a7d9a5cae31a5a3cc0fb6663ae6 @jimweirich committed Nov 21, 2012
Showing with 10 additions and 2 deletions.
  1. +10 −2 test/test_rake_task_with_arguments.rb
@@ -142,7 +142,7 @@ def test_named_args_are_passed_to_prereqs
assert_equal "1.2", value
end
- def test_args_not_passed_if_no_prereq_names
+ def test_args_not_passed_if_no_prereq_names_on_task
pre = task(:pre) { |t, args|
assert_equal({}, args.to_hash)
assert_equal "bill", args.name
@@ -151,6 +151,15 @@ def test_args_not_passed_if_no_prereq_names
t.invoke("bill", "1.2")
end
+ def test_args_not_passed_if_no_prereq_names_on_multitask
+ pre = task(:pre) { |t, args|
+ assert_equal({}, args.to_hash)
+ assert_equal "bill", args.name
+ }
+ t = multitask(:t, [:name, :rev] => [:pre])
+ t.invoke("bill", "1.2")
+ end
+
def test_args_not_passed_if_no_arg_names
pre = task(:pre, :rev) { |t, args|
assert_equal({}, args.to_hash)
@@ -170,4 +179,3 @@ def test_values_at
# HACK no assertions
end
end
-

0 comments on commit c95fbc7

Please sign in to comment.