summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormurphy <murphy@rubychan.de>2006-10-17 11:27:14 +0000
committermurphy <murphy@rubychan.de>2006-10-17 11:27:14 +0000
commitc1188b9af9b1696a2f985014b1c05c82e7fd99fb (patch)
treeebd4c3dd768d595387dae948bfc4fdc00dfd4330
parentb1700c6263bee4d1400d9fe26a2c06034a70eec3 (diff)
downloadcoderay-c1188b9af9b1696a2f985014b1c05c82e7fd99fb.tar.gz
Added functional test task and renamed all test task descriptions.
rake test now runs both functional and scanner tests! Deleted stupid classes test.
-rw-r--r--rake_tasks/test.rake13
-rwxr-xr-xtest/functional/basic.rb14
2 files changed, 9 insertions, 18 deletions
diff --git a/rake_tasks/test.rake b/rake_tasks/test.rake
index 2a3d48e..894cd19 100644
--- a/rake_tasks/test.rake
+++ b/rake_tasks/test.rake
@@ -1,15 +1,20 @@
namespace :test do
- desc 'Test CodeRay Demos'
+ desc 'run all sample tests'
task :samples do
system 'ruby -wd ./sample/suite.rb'
end
- desc 'Test CodeRay'
+ desc 'run functional tests'
+ task :functional do
+ system 'ruby -wd ./test/functional/suite.rb'
+ end
+
+ desc 'run all scanner tests'
task :scanners do
system 'ruby -wd ./test/scanners/suite.rb'
end
- desc 'Clean test output files'
+ desc 'clean test output files'
task :clean do
for file in Dir['test/scanners/**/*.actual.*']
rm file
@@ -17,5 +22,5 @@ namespace :test do
end
end
-task :test => %w( test:scanners )
+task :test => %w( test:functional test:scanners )
task :samples => 'test:samples'
diff --git a/test/functional/basic.rb b/test/functional/basic.rb
index f5699ae..01fcd4f 100755
--- a/test/functional/basic.rb
+++ b/test/functional/basic.rb
@@ -9,20 +9,6 @@ class Basic < Test::Unit::TestCase
end
end
- def test_classes_exist
- assert_nothing_raised do
- CodeRay
- CodeRay::Encoders::Encoder
- CodeRay::Encoders
- CodeRay::Scanners::Scanner
- CodeRay::Scanners
- CodeRay::Tokens
- CodeRay::TokenStream
- Plugin
- WordList
- end
- end
-
RUBY_TEST_CODE = 'puts "Hello, World!"'
def test_simple_scan