Permalink
Browse files

Add unit tests for RDocTask.

  • Loading branch information...
1 parent 3b88fe0 commit a8d3e8726dde0914aad1f1d8d478db12d2468827 @FooBarWidget FooBarWidget committed Oct 27, 2008
Showing with 25 additions and 0 deletions.
  1. +25 −0 test/test_rdoc_task.rb
View
25 test/test_rdoc_task.rb
@@ -0,0 +1,25 @@
+#!/usr/bin/env ruby
+
+require 'test/unit'
+require 'rake/rdoctask'
+require 'test/rake_test_setup'
+
+class TestRDocTask < Test::Unit::TestCase
+ include Rake
+ include TestMethods
+
+ def test_tasks_creation
+ Rake::RDocTask.new
+ assert Task[:rdoc]
+ assert Task[:clobber_rdoc]
+ assert Task[:rerdoc]
+ end
+
+ def test_tasks_creation_with_custom_name
+ rd = Rake::RDocTask.new(:rdoc_dev)
+ assert Task[:rdoc_dev]
+ assert Task[:clobber_rdoc_dev]
+ assert Task[:rerdoc_dev]
+ assert_equal :rdoc_dev, rd.name
+ end
+end

0 comments on commit a8d3e87

Please sign in to comment.