From c1188b9af9b1696a2f985014b1c05c82e7fd99fb Mon Sep 17 00:00:00 2001 From: murphy Date: Tue, 17 Oct 2006 11:27:14 +0000 Subject: Added functional test task and renamed all test task descriptions. rake test now runs both functional and scanner tests! Deleted stupid classes test. --- rake_tasks/test.rake | 13 +++++++++---- test/functional/basic.rb | 14 -------------- 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 -- cgit v1.2.1