From b3807c5aa09901f50dca09b7927f37b1902ee32f Mon Sep 17 00:00:00 2001 From: Kornelius Kalnbach Date: Tue, 27 Dec 2011 02:38:08 +0100 Subject: add test for #6 (pry autoload issue) --- test/functional/basic.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'test') 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 = [ -- cgit v1.2.1