diff options
author | Kornelius Kalnbach <murphy@rubychan.de> | 2011-12-27 02:38:08 +0100 |
---|---|---|
committer | Kornelius Kalnbach <murphy@rubychan.de> | 2011-12-27 02:38:08 +0100 |
commit | b3807c5aa09901f50dca09b7927f37b1902ee32f (patch) | |
tree | ef56317f1cded4d05610c0fd1491d858702975dd /test | |
parent | ac2d6f1898a5aa1aad7cc254290ec9341d2cdf60 (diff) | |
download | coderay-b3807c5aa09901f50dca09b7927f37b1902ee32f.tar.gz |
add test for #6 (pry autoload issue)
Diffstat (limited to 'test')
-rwxr-xr-x | test/functional/basic.rb | 16 |
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 = [ |