mirror of
https://github.com/teamcapybara/capybara.git
synced 2022-11-09 12:08:07 -05:00
Use Psych safe load in tests
This commit is contained in:
parent
312ab56ac4
commit
c5151907f2
1 changed files with 3 additions and 2 deletions
|
@ -117,8 +117,9 @@ module Capybara
|
|||
|
||||
def extract_results(session)
|
||||
expect(session).to have_xpath("//pre[@id='results']")
|
||||
# YAML.load Nokogiri::HTML(session.body).xpath("//pre[@id='results']").first.inner_html.lstrip
|
||||
YAML.load Capybara::HTML(session.body).xpath("//pre[@id='results']").first.inner_html.lstrip
|
||||
perms = [(::Sinatra::IndifferentHash if defined? ::Sinatra::IndifferentHash)].compact
|
||||
results = Capybara::HTML(session.body).xpath("//pre[@id='results']").first.inner_html.lstrip
|
||||
YAML.safe_load results, permitted_classes: perms
|
||||
end
|
||||
|
||||
def be_an_invalid_element_error(session)
|
||||
|
|
Loading…
Add table
Reference in a new issue