diff options
author | Kornelius Kalnbach <murphy@rubychan.de> | 2011-12-27 04:08:29 +0100 |
---|---|---|
committer | Kornelius Kalnbach <murphy@rubychan.de> | 2011-12-27 04:08:29 +0100 |
commit | 2afe23ab0a3d17b50f55750241a682403ced4fc8 (patch) | |
tree | 19708f1d79ce22eed6b0e90de4760a8cfcc9504b /test | |
parent | c044a7a6eaba9ba47b8fde2cd6bdd444d8f87062 (diff) | |
parent | 9c3837e0086ca07f241e9cc74c9fabbeb2d39987 (diff) | |
download | coderay-2afe23ab0a3d17b50f55750241a682403ced4fc8.tar.gz |
Merge branch 'master' into multiline-inline-diff
Conflicts:
coderay.gemspec
Diffstat (limited to 'test')
-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 |