summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtest/functional/basic.rb16
1 files changed, 16 insertions, 0 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 = [