summaryrefslogtreecommitdiff
path: root/test/rake/test_rake_file_task.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-11-25 07:03:36 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-11-25 07:03:36 +0000
commit3908d5d3303dbd3f20f106aa71b5c094b67ac577 (patch)
treec607909aa5a9b12e6c134cf6268b56db02881fc0 /test/rake/test_rake_file_task.rb
parentf20f84d60a467c1bc8a0ca81fe2788fa4c8079f8 (diff)
* lib/rake: Update to rake 10.4.0
* test/rake: ditto. * NEWS: ditto. * test/lib/minitest/unit.rb: Add compatibility shim for minitest 5. This only provides minitest 5 unit test naming compatibility. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rake/test_rake_file_task.rb')
-rw-r--r--test/rake/test_rake_file_task.rb12
1 files changed, 4 insertions, 8 deletions
diff --git a/test/rake/test_rake_file_task.rb b/test/rake/test_rake_file_task.rb
index a6a9fa2c510..a2495114423 100644
--- a/test/rake/test_rake_file_task.rb
+++ b/test/rake/test_rake_file_task.rb
@@ -24,6 +24,7 @@ class TestRakeFileTask < Rake::TestCase
File.delete(ftask.name) rescue nil
assert ftask.needed?, "file should be needed"
+ assert_equal Rake::LATE, ftask.timestamp
open(ftask.name, "w") { |f| f.puts "HI" }
@@ -84,19 +85,14 @@ class TestRakeFileTask < Rake::TestCase
end
def test_existing_file_depends_on_non_existing_file
- @ran = false
-
create_file(OLDFILE)
delete_file(NEWFILE)
- file NEWFILE do
- @ran = true
- end
-
- file OLDFILE => NEWFILE
+ file NEWFILE do |t| @runs << t.name end
+ file OLDFILE => NEWFILE do |t| @runs << t.name end
Task[OLDFILE].invoke
- assert @ran
+ assert_equal [NEWFILE, OLDFILE], @runs
end
def test_needed_eh_build_all