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