Skip to content
Browse files

Merge remote-tracking branch 'origin/master' into next-major-release

* origin/master:
  Tiny example fix in rakefile.rdoc
  Fixed unusued variable warnings

Conflicts:
	test/test_rake_task_with_arguments.rb
  • Loading branch information...
2 parents 2b0e29e + 7df9e67 commit 91e1d4abeb4fd2f2eca7f5f78c824418a0a2376b @jimweirich committed
Showing with 13 additions and 13 deletions.
  1. +1 −1 doc/rakefile.rdoc
  2. +1 −1 test/test_rake_directory_task.rb
  3. +7 −7 test/test_rake_task.rb
  4. +4 −4 test/test_rake_task_with_arguments.rb
View
2 doc/rakefile.rdoc
@@ -193,7 +193,7 @@ example, if the "release" task expected a parameter named
or
- RELEASE_VERSION rake release
+ RELEASE_VERSION=0.8.2 rake release
will work. Environment variable names must either match the task
parameter exactly, or match an all-uppercase version of the task
View
2 test/test_rake_directory_task.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
14 test/test_rake_task.rb
@@ -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
View
8 test/test_rake_task_with_arguments.rb
@@ -126,14 +126,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
}
@@ -142,7 +142,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
}
@@ -151,7 +151,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 91e1d4a

Please sign in to comment.
Something went wrong with that request. Please try again.