Skip to content

Commit 5046bfa

Browse files
committed
rack_release spec helper
1 parent 65b3c06 commit 5046bfa

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/spec/ruby/spec_helper.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,12 @@ def servlet_30?
8080
end
8181
private :servlet_30?
8282

83+
def rack_release(at_least = nil)
84+
require 'rack'; release = Rack.release
85+
at_least.nil? ? release : release >= at_least
86+
end
87+
private :rack_release
88+
8389
def raise_logger(level = 'WARN')
8490
org.jruby.rack.logging.RaiseLogger.new(level, JRuby.runtime.out)
8591
end

0 commit comments

Comments
 (0)