Skip to content

Commit

Permalink
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions test/jruby/test_load_gem_extensions.rb
Original file line number Diff line number Diff line change
@@ -17,17 +17,20 @@ def teardown
$LOAD_PATH.concat(@prev_load_path)
end

def test_require_extension_file_via_uri_protocol
skip 'needs jruby-home from filesystem' if JRuby.runtime.instance_config.jruby_home =~ /META-INF/
require 'uri:file:./lib/ruby/stdlib/json/ext/parser'
# just check if extension class exists
JSON::Ext::Parser
end
# running this with embedded JRuby brings: NoMethodError: undefined method `skip' for #<TestLoad:0x28434905>
unless JRuby.runtime.instance_config.jruby_home =~ /META-INF/
def test_require_extension_file_via_uri_protocol
skip 'needs jruby-home from filesystem' if JRuby.runtime.instance_config.jruby_home =~ /META-INF/
require 'uri:file:./lib/ruby/stdlib/json/ext/parser'
# just check if extension class exists
JSON::Ext::Parser
end

def test_require_extension_file_via_uri_classloader_protocol
skip 'needs jruby-home from filesystem' if JRuby.runtime.instance_config.jruby_home =~ /META-INF/
require 'uri:classloader:/lib/ruby/stdlib/json/ext/generator'
# just check if extension class exists
JSON::Ext::Generator
def test_require_extension_file_via_uri_classloader_protocol
skip 'needs jruby-home from filesystem' if JRuby.runtime.instance_config.jruby_home =~ /META-INF/
require 'uri:classloader:/lib/ruby/stdlib/json/ext/generator'
# just check if extension class exists
JSON::Ext::Generator
end
end
end

0 comments on commit 654473a

Please sign in to comment.