Permalink
Browse files

Fixed unusued variable warnings

  • Loading branch information...
1 parent 530e751 commit 847431857e3f6639c18d1dfc67943b4e85188918 @drbrain drbrain committed Dec 21, 2012
Showing with 13 additions and 13 deletions.
  1. +1 −1 test/test_rake_directory_task.rb
  2. +7 −7 test/test_rake_task.rb
  3. +5 −5 test/test_rake_task_with_arguments.rb
@@ -43,7 +43,7 @@ def test_can_use_blocks
runlist = []
t1 = directory("a/b/c" => :t2) { |t| runlist << t.name }
- t2 = task(:t2) { |t| runlist << t.name }
+ task(:t2) { |t| runlist << t.name }
verbose(false) {
t1.invoke
View
@@ -40,8 +40,8 @@ def test_inspect
def test_invoke
runlist = []
t1 = task(:t1 => [:t2, :t3]) { |t| runlist << t.name; 3321 }
- t2 = task(:t2) { |t| runlist << t.name }
- t3 = task(:t3) { |t| runlist << t.name }
+ task(:t2) { |t| runlist << t.name }
+ task(:t3) { |t| runlist << t.name }
assert_equal ["t2", "t3"], t1.prerequisites
t1.invoke
assert_equal ["t2", "t3", "t1"], runlist
@@ -88,8 +88,8 @@ def test_tasks_can_be_traced
def test_no_double_invoke
runlist = []
t1 = task(:t1 => [:t2, :t3]) { |t| runlist << t.name; 3321 }
- t2 = task(:t2 => [:t3]) { |t| runlist << t.name }
- t3 = task(:t3) { |t| runlist << t.name }
+ task(:t2 => [:t3]) { |t| runlist << t.name }
+ task(:t3) { |t| runlist << t.name }
t1.invoke
assert_equal ["t3", "t2", "t1"], runlist
end
@@ -204,7 +204,7 @@ def test_prerequiste_tasks_returns_tasks_not_strings
def test_prerequiste_tasks_fails_if_prerequisites_are_undefined
a = task :a => ["b", "c"]
- b = task :b
+ task :b
assert_raises(RuntimeError) do
a.prerequisite_tasks
end
@@ -223,8 +223,8 @@ def test_prerequiste_tasks_honors_namespaces
def test_timestamp_returns_now_if_all_prereqs_have_no_times
a = task :a => ["b", "c"]
- b = task :b
- c = task :c
+ task :b
+ task :c
assert_in_delta Time.now, a.timestamp, 0.1, 'computer too slow?'
end
@@ -45,7 +45,7 @@ def test_name_args_and_explicit_needs
def test_illegal_keys_in_task_name_hash
ignore_deprecations do
assert_raises RuntimeError do
- t = task(:t, :x, :y => 1, :needs => [:pre])
+ task(:t, :x, :y => 1, :needs => [:pre])
end
end
end
@@ -136,14 +136,14 @@ def test_name_with_args
def test_named_args_are_passed_to_prereqs
value = nil
- pre = task(:pre, :rev) { |t, args| value = args.rev }
+ task(:pre, :rev) { |t, args| value = args.rev }
t = task(:t, [:name, :rev] => [:pre])
t.invoke("bill", "1.2")
assert_equal "1.2", value
end
def test_args_not_passed_if_no_prereq_names_on_task
- pre = task(:pre) { |t, args|
+ task(:pre) { |t, args|
assert_equal({}, args.to_hash)
assert_equal "bill", args.name
}
@@ -152,7 +152,7 @@ def test_args_not_passed_if_no_prereq_names_on_task
end
def test_args_not_passed_if_no_prereq_names_on_multitask
- pre = task(:pre) { |t, args|
+ task(:pre) { |t, args|
assert_equal({}, args.to_hash)
assert_equal "bill", args.name
}
@@ -161,7 +161,7 @@ def test_args_not_passed_if_no_prereq_names_on_multitask
end
def test_args_not_passed_if_no_arg_names
- pre = task(:pre, :rev) { |t, args|
+ task(:pre, :rev) { |t, args|
assert_equal({}, args.to_hash)
}
t = task(:t => [:pre])

0 comments on commit 8474318

Please sign in to comment.