Sha256: 7dbaeb1228a13612b603b15385410b0f9634f7d32c9d06f4e87c0760ff6bda1c
Contents?: true
Size: 651 Bytes
Versions: 73
Compression:
Stored size: 651 Bytes
Contents
Given /^the following <%= plural_name %>:$/ do |<%= plural_name %>| <%= class_name %>.create!(<%= plural_name %>.hashes) end When /^I delete the (\d+)(?:st|nd|rd|th) <%= singular_name %>$/ do |pos| visit <%= plural_name %>_url within("table > tr:nth-child(#{pos.to_i+1})") do click_link "Destroy" end end Then /^I should see the following <%= plural_name %>:$/ do |<%= plural_name %>| <%= plural_name %>.rows.each_with_index do |row, i| row.each_with_index do |cell, j| response.should have_selector("table > tr:nth-child(#{i+2}) > td:nth-child(#{j+1})") { |td| td.inner_text.should == cell } end end end
Version data entries
73 entries across 73 versions & 8 rubygems