File: test_load_class_before_rb.rb

package info (click to toggle)
jruby 1.5.1-1
  • links: PTS, VCS
  • area: non-free
  • in suites: squeeze
  • size: 46,252 kB
  • ctags: 72,039
  • sloc: ruby: 398,155; java: 169,482; yacc: 3,782; xml: 2,469; ansic: 415; sh: 279; makefile: 78; tcl: 40
file content (20 lines) | stat: -rw-r--r-- 644 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
require 'test/unit'

# This test is for JRUBY-3029, testing that each path is searched for .class and .rb before
# proceeding to the next path. The .class source loaded has different code from the .rb
# version, but to make them load and be testable in a specific way. I include the source
# of the .class version here...

=begin
$jruby3029 = 'class'
=end

class TestLoadClassBeforeRb < Test::Unit::TestCase
  def test_load_class_before_rb
    $LOAD_PATH << File.expand_path(File.dirname(__FILE__) + "/dir1")
    $LOAD_PATH << File.expand_path(File.dirname(__FILE__) + "/dir2")

    require 'target'
    assert_equal 'rb', $jruby3029
  end
end