lib/fracture/matchers/matcher.rb in fracture-0.11.3 vs lib/fracture/matchers/matcher.rb in fracture-0.11.4

- old
+ new

@@ -85,10 +85,10 @@ end RSpec::Matchers.define :have_a_form do match do |page| page = Nokogiri::HTML.parse(Fracture.get_body(page)) - @edit_found = page.at("input[type='hidden'][name='_method'][value='put']") + @edit_found = page.at("input[type='hidden'][name='_method'][value='put']") || page.at("input[type='hidden'][name='_method'][value='patch']") @has_form = page.at("form[method='post']") #TODO refactor this #@found_action = page.at("form[action]").try(:attributes).try(:fetch, "action", nil).try(:value) @found_action = page.at("form[action]") && page.at("form[action]").attributes &&