I'm just not sure what the exact way to word it is..
This tells me 'No response yet. Request a page first.'
it "should list searches" do
get 'index'
page.should have_selector('tr#search-1')
end
Is it meant to be like this instead?
it "should list searches" do
get 'index' do
page.should have_selector('tr#search-1')
end
end
That way doesn't seem to actually test anything though.
What's the correct way?
According to this, Capybara doesn't support PUT and DELETE requests with the default driver. PUT and DELETE are usually faked with javascript to accomodate REST based architecture.
I haven't checked, but I believe that you can use PUT and DELETE with Capybara if you make it use one of it's JS compatible drivers such as Selenium.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With