diff options
Diffstat (limited to 'test/functional')
-rwxr-xr-x | test/functional/basic.rb | 16 | ||||
-rwxr-xr-x | test/functional/examples.rb | 1 |
2 files changed, 16 insertions, 1 deletions
diff --git a/test/functional/basic.rb b/test/functional/basic.rb index bf289b3..3053b54 100755 --- a/test/functional/basic.rb +++ b/test/functional/basic.rb @@ -13,6 +13,22 @@ class BasicTest < Test::Unit::TestCase end end + def with_empty_load_path + old_load_path = $:.dup + $:.clear + yield + ensure + $:.replace old_load_path + end + + def test_autoload + with_empty_load_path do + assert_nothing_raised do + CodeRay::Scanners::Java::BuiltinTypes + end + end + end + RUBY_TEST_CODE = 'puts "Hello, World!"' RUBY_TEST_TOKENS = [ diff --git a/test/functional/examples.rb b/test/functional/examples.rb index 8540ac9..ff64af3 100755 --- a/test/functional/examples.rb +++ b/test/functional/examples.rb @@ -97,7 +97,6 @@ Token Types (7): DIV # highlight a file (HTML div); guess the file type base on the extension - require 'coderay/helpers/file_type' assert_equal :ruby, CodeRay::FileType[__FILE__] # get a new scanner for Python |