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

Version Path
aslakhellesoy-cucumber-0.1.10 rails_generators/feature/templates/steps.erb
aslakhellesoy-cucumber-0.1.11 rails_generators/feature/templates/steps.erb
aslakhellesoy-cucumber-0.1.12 rails_generators/feature/templates/steps.erb
aslakhellesoy-cucumber-0.1.3 generators/feature/templates/steps.erb
aslakhellesoy-cucumber-0.1.4 generators/feature/templates/steps.erb
aslakhellesoy-cucumber-0.1.9 rails_generators/feature/templates/steps.erb
elight-cucumber-0.1.9 rails_generators/feature/templates/steps.erb
jeffrafter-cucumber-0.1.10 rails_generators/feature/templates/steps.erb
jeffrafter-cucumber-0.1.12 rails_generators/feature/templates/steps.erb
newgem-1.5.3 cucumber_generators/feature/templates/steps.erb
newgem-1.5.0 cucumber_generators/feature/templates/steps.erb
newgem-1.5.1 cucumber_generators/feature/templates/steps.erb
newgem-1.5.2 cucumber_generators/feature/templates/steps.erb
cucumber-0.1.11 rails_generators/feature/templates/steps.erb
cucumber-0.1.10 rails_generators/feature/templates/steps.erb
cucumber-0.1.12 rails_generators/feature/templates/steps.erb
cucumber-0.1.6 generators/feature/templates/steps.erb
cucumber-0.1.7 generators/feature/templates/steps.erb
cucumber-0.1.8 rails_generators/feature/templates/steps.erb
cucumber-0.1.9 rails_generators/feature/templates/steps.erb