Skip to content

Commit

Permalink
Added test for MultiTask + arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeljbishop committed Aug 31, 2012
1 parent d677dac commit 4f0e44b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@
/coverage /coverage
/html /html
/pkg /pkg

.DS_Store
8 changes: 8 additions & 0 deletions test/test_rake_multi_task.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -47,5 +47,13 @@ def test_all_multitasks_wait_on_slow_prerequisites
assert @runs.index("B0") < @runs.index("B1") assert @runs.index("B0") < @runs.index("B1")
assert @runs.index("B1") < @runs.index("B2") assert @runs.index("B1") < @runs.index("B2")
end end

def test_multitasks_with_parameters
task :a, [:arg] do |t,args| add_run(args[:arg]) end
multitask :b, [:arg] => [:a] do |t,args| add_run(args[:arg]+'mt') end
Task[:b].invoke "b"
assert @runs[0] == "b"
assert @runs[1] == "bmt"
end
end end


0 comments on commit 4f0e44b

Please sign in to comment.