Sha256: 716a3213b1b68098da28231af879fbc2e0ed3e8bc725258455925144278d8fa8
Contents?: true
Size: 749 Bytes
Versions: 42
Compression:
Stored size: 749 Bytes
Contents
Given /I am on the new <%= singular_name %> page/ do visit "/<%= plural_name %>/new" end 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
42 entries across 42 versions & 4 rubygems