Skip to content

Commit 28350d7

Browse files
committed
[test] use blessed way of loading an extension
1 parent 210cbbc commit 28350d7

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/spec/ruby/spec_helper.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@
2121

2222
require 'rspec'
2323

24-
require 'jruby'; ext_class = org.jruby.rack.ext.RackLibrary
25-
JRuby.runtime.loadExtension 'JRuby::Rack', ext_class.new, true
24+
JRuby::Util.load_ext('org.jruby.rack.ext.RackLibrary')
2625

2726
module SharedHelpers
2827

@@ -170,7 +169,7 @@ def should_not_eval_as_nil(code, runtime = @runtime) # alias
170169
rescue LoadError
171170
end
172171

173-
# current 'library' environment (based on appraisals) e.g. :rails32
172+
# current 'library' environment (based on appraisals) e.g. :rails72
174173
CURRENT_LIB = defined?(Rails::VERSION) ?
175174
:"rails#{Rails::VERSION::MAJOR}#{Rails::VERSION::MINOR}" : :stub
176175

0 commit comments

Comments
 (0)