mirror of
https://github.com/heartcombo/devise.git
synced 2026-02-19 02:44:31 -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:
@@ -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