Updated

features/step_definitions / validation_steps.rb

A
8 lines of codes
0 methods
N/A complexity/method
8 churn
18.85 complexity
0 duplications
Then /^the markup should be valid$/ do tags = %w[header nav main details summary section footer time] pattern = /\A\d+:\d+: ERROR: Tag (?:#{tags.join('|')}) invalid\z/ filter = -> (error){ error.message =~ pattern } document = Nokogiri::HTML(page.source) expect(document.errors.reject(&filter)).to be_empty end