Stop being clever Capybara
We found that it was because of the Rails 3 ability to make links become either HTTP DELETE or POST requests. So when creating a link in rails like this:
link_to "Delete blog post", blog_post(@blog), :method => :delete
It would output into a html link:
<a href="/blog/1" data-method="delete">Delete blog post</a>
data-method is a HTML5 custom attribute by the looks of things. When the page is loaded the default
Moving forward I'm going to try and steer clear from using the ':method => :delete' in rails or monkey patch capybara to stop it changing the test request based on the 'data-method'.
Have thoughts on what I've shared? Please tweet me @kalv publicly or privately, would love to chat.