how to write “Destroy kid” in cucumber:
Scenario: User can delete kids
Given I am on the kids page
When I Destroy kid
Then I should see "Kid deleted successfully"
Then one kid should not exist
<h1>Listing kids</h1>
<tr>
<th>Kid name</th>
<th colspan=3>Action</th>
</tr>
<% @kids.each do |kid| %>
<tr>
<td><%= kid.kid_name %></td>
<td><%= link_to ''Show'', kid %></td>
<td><%= link_to ''Edit'', edit_kid_path(kid)
%></td>
<td><%= link_to ''Destroy'', kid, method: :delete,
data: { confirm: ''Are you sure?'' }
%></td>
</tr>
<% end %>
<%= link_to ''New Kid'', new_kid_path %>
what to write in definition:
When /^I Destroy kid$/ do
#what to write......
end
Please suggest me.
Thank you
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit
https://groups.google.com/d/msgid/rubyonrails-talk/f315c5326b6abd408559d6a651e88f0b%40ruby-forum.com.
For more options, visit https://groups.google.com/groups/opt_out.