mirror of
https://github.com/heartcombo/devise.git
synced 2026-01-08 22:37:57 -05:00
Make test suite work (#5770)
* Drop support for Rails < 7 and Ruby < 2.7 * Add tests to support to Rails 8+ * Fix test suite across all supported versions
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
require File.expand_path('../boot', __FILE__)
|
||||
|
||||
require "logger"
|
||||
require "action_controller/railtie"
|
||||
require "action_mailer/railtie"
|
||||
require "rails/test_unit/railtie"
|
||||
|
||||
@@ -4,9 +4,13 @@ module Webrat
|
||||
class HaveSelector
|
||||
def query
|
||||
Nokogiri::CSS.parse(@expected.to_s).map do |ast|
|
||||
ast.to_xpath("//", Nokogiri::CSS::XPathVisitor.new)
|
||||
if ::Gem::Version.new(Nokogiri::VERSION) < ::Gem::Version.new('1.17.2')
|
||||
ast.to_xpath('//', Nokogiri::CSS::XPathVisitor.new)
|
||||
else
|
||||
ast.to_xpath(Nokogiri::CSS::XPathVisitor.new)
|
||||
end
|
||||
end.first
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user