Skip to content

Commit

Permalink
test_rake_clean.rb: due to Task.clear, this can only be called once
Browse files Browse the repository at this point in the history
  • Loading branch information
quix committed May 21, 2011
1 parent 15342cf commit f2c2948
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions test/test_rake_clean.rb
@@ -1,12 +1,14 @@
require 'test/helper'
require 'rake/clean'

class TestRakeClean < Rake::TestCase
include Rake
def test_clean
assert Task['clean'], "Should define clean"
assert Task['clobber'], "Should define clobber"
assert Task['clobber'].prerequisites.include?("clean"),
"Clobber should require clean"
# since other tests call Task.clear, this is only works once
if require('rake/clean')
assert Task['clean'], "Should define clean"
assert Task['clobber'], "Should define clobber"
assert Task['clobber'].prerequisites.include?("clean"),
"Clobber should require clean"
end
end
end

0 comments on commit f2c2948

Please sign in to comment.