Sha256: 1988e4e654d91f30ae14d3c26a14064bbd67c1c5afb293293bb8e0fe74179559

Contents?: true

Size: 706 Bytes

Versions: 17

Compression:

Stored size: 706 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

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
saucy-0.5.1 lib/generators/saucy/features/templates/step_definitions/account_steps.rb
saucy-0.5.0 lib/generators/saucy/features/templates/step_definitions/account_steps.rb
saucy-0.4.10 lib/generators/saucy/features/templates/step_definitions/account_steps.rb
saucy-0.4.9 lib/generators/saucy/features/templates/step_definitions/account_steps.rb
saucy-0.4.8 lib/generators/saucy/features/templates/step_definitions/account_steps.rb
saucy-0.4.7 lib/generators/saucy/features/templates/step_definitions/account_steps.rb
saucy-0.4.6 lib/generators/saucy/features/templates/step_definitions/account_steps.rb
saucy-0.4.5 lib/generators/saucy/features/templates/step_definitions/account_steps.rb
saucy-0.4.4 lib/generators/saucy/features/templates/step_definitions/account_steps.rb
saucy-0.4.3 lib/generators/saucy/features/templates/step_definitions/account_steps.rb
saucy-0.4.2 lib/generators/saucy/features/templates/step_definitions/account_steps.rb
saucy-0.4.1 lib/generators/saucy/features/templates/step_definitions/account_steps.rb
saucy-0.3.4.1 lib/generators/saucy/features/templates/step_definitions/account_steps.rb
saucy-0.4.0 lib/generators/saucy/features/templates/step_definitions/account_steps.rb
saucy-0.3.4 lib/generators/saucy/features/templates/step_definitions/account_steps.rb
saucy-0.3.3 lib/generators/saucy/features/templates/step_definitions/account_steps.rb
saucy-0.3.2 lib/generators/saucy/features/templates/step_definitions/account_steps.rb