module RSpec::HTML
Module extension for RSpec::SharedContext
Constants
- VERSION
Public Instance Methods
document()
click to toggle source
# File lib/rspec/html.rb, line 11 def document return @document if @document RSpecHTML::Element.new(Nokogiri::HTML.parse(response.body), :document) rescue NameError raise RSpecHTML::NoResponseError, 'No `response` object found. Make a request first.' end
parse_html(content)
click to toggle source
# File lib/rspec/html.rb, line 19 def parse_html(content) @document = RSpecHTML::Element.new(Nokogiri::HTML.parse(content), :document) end