Skip to content

Commit b3807c5

Browse files
committed
add test for rubychan#6 (pry autoload issue)
1 parent ac2d6f1 commit b3807c5

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

test/functional/basic.rb

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,22 @@ def test_version
1313
end
1414
end
1515

16+
def with_empty_load_path
17+
old_load_path = $:.dup
18+
$:.clear
19+
yield
20+
ensure
21+
$:.replace old_load_path
22+
end
23+
24+
def test_autoload
25+
with_empty_load_path do
26+
assert_nothing_raised do
27+
CodeRay::Scanners::Java::BuiltinTypes
28+
end
29+
end
30+
end
31+
1632
RUBY_TEST_CODE = 'puts "Hello, World!"'
1733

1834
RUBY_TEST_TOKENS = [

0 commit comments

Comments
 (0)