Sha256: db60f3f973546f91564b43b4f416a3def5ca964c3db0cc12a2744c876f0f1502
Contents?: true
Size: 657 Bytes
Versions: 12
Compression:
Stored size: 657 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 %>.raw[1..-1].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
12 entries across 12 versions & 3 rubygems