views:

33

answers:

1

Hello,

I am currently developing a Rails application, I'm trying to units test it. I chose Cucumber + WebRater. I'd like to test in my backend all delete link.

I tried to go to visit a second argument (the method: delete) without success. (something like : visit my_path, method => :delete)

On my pages I delete some links so the solution click_link ("Delete") is not acceptable.

I appeal to your experience in this field.

Thank you in advance

Gaetan.

A: 

The method :delete us Javascript to made the good request to you server with a POST and _method='put".

Webrat don't know how interprete the Javascript. If you want that, you need use some backend with it. Capybara or Selenium.

shingara