Sha256: c7fb4ca473027ded362908ae6c5e43adddb87fb0caa27cb240f576ebeab7a801

Contents?: true

Size: 1019 Bytes

Versions: 17

Compression:

Stored size: 1019 Bytes

Contents

Given /^an? "([^"]+)" account exists with a name of "([^"]*)" created (\d+) days ago$/ do |plan_name, account_name, days|
  plan = Plan.find_by_name!(plan_name)
  Factory(:account, :created_at => days.to_i.days.ago, :plan => plan, :name => account_name)
end

Given /^the "([^"]*)" account was created (\d+) days ago$/ do |account_name, days|
  Account.find_by_name!(account_name).tap do |account|
    account.created_at = days.to_i.days.ago
    account.save!
  end
end

Given /^the following limit exists for the "([^"]*)" account:$/ do |account_name, table|
  Account.find_by_name!(account_name).tap do |account|
    table.hashes.each do |limit|
      account.plan.limits.create!(limit)
    end
  end
end

When /^I follow "([^"]*)" for the "([^"]*)" account$/ do |link_text, account_name|
  account = Account.find_by_name!(account_name)
  within "##{dom_id(account)}" do
    click_link link_text
  end
end

Then /^I should see (\d+) accounts?$/ do |count|
  page.all("#user_accounts li").size.should == count.to_i
end

Version data entries

17 entries across 17 versions & 2 rubygems

Version Path
saasy-0.0.2.alpha3 lib/generators/saucy/features/templates/step_definitions/account_steps.rb
saasy-0.0.2.alpha2 lib/generators/saucy/features/templates/step_definitions/account_steps.rb
saasy-0.0.2.alpha1 lib/generators/saucy/features/templates/step_definitions/account_steps.rb
saasy-0.0.1 lib/generators/saucy/features/templates/step_definitions/account_steps.rb
saucy-0.8.2 lib/generators/saucy/features/templates/step_definitions/account_steps.rb
saucy-0.8.1 lib/generators/saucy/features/templates/step_definitions/account_steps.rb
saucy-0.8.0 lib/generators/saucy/features/templates/step_definitions/account_steps.rb
saucy-0.7.3 lib/generators/saucy/features/templates/step_definitions/account_steps.rb
saucy-0.7.2 lib/generators/saucy/features/templates/step_definitions/account_steps.rb
saucy-0.7.1 lib/generators/saucy/features/templates/step_definitions/account_steps.rb
saucy-0.7.0 lib/generators/saucy/features/templates/step_definitions/account_steps.rb
saucy-0.6.1 lib/generators/saucy/features/templates/step_definitions/account_steps.rb
saucy-0.6.0 lib/generators/saucy/features/templates/step_definitions/account_steps.rb
saucy-0.5.5 lib/generators/saucy/features/templates/step_definitions/account_steps.rb
saucy-0.5.4 lib/generators/saucy/features/templates/step_definitions/account_steps.rb
saucy-0.5.3 lib/generators/saucy/features/templates/step_definitions/account_steps.rb
saucy-0.5.2 lib/generators/saucy/features/templates/step_definitions/account_steps.rb