Sha256: 9b437c21a4f24af8bbbf470aab3757311378b60df41e140c2accc297cfb47586
Contents?: true
Size: 618 Bytes
Versions: 38
Compression:
Stored size: 618 Bytes
Contents
Given /I am on the new <%= singular_name %> page/ do visits "/<%= plural_name %>/new" end Given /there are (\d+) <%= plural_name %>/ do |n| <%= class_name %>.transaction do <%= class_name %>.destroy_all n.to_i.times do |n| <%= class_name %>.create! :name => "<%= class_name %> #{n}" end end end When /I delete the first <%= singular_name %>/ do visits <%= plural_name %>_url clicks_link "Destroy" end Then /there should be (\d+) <%= plural_name %> left/ do |n| <%= class_name %>.count.should == n.to_i response.should have_tag("table tr", n.to_i + 1) # There is a header row too end
Version data entries
38 entries across 38 versions & 5 rubygems