Sha256: 6ff7cd04302d64fe258f0562e9b0fd15f54b855ff95c839f5bbc217b40516157

Contents?: true

Size: 838 Bytes

Versions: 4

Compression:

Stored size: 838 Bytes

Contents

Factory.define :new_customer, :class => Mousetrap::Customer, :default_strategy => :stub do |f|
  f.email { random_email_address }
  f.first_name { random_string }
  f.last_name { random_string }
  f.code { |me| me.email }
  f.add_attribute :id, nil
  f.subscription_attributes { Factory.attributes_for :subscription }
end

Factory.define :existing_customer, :parent => :new_customer, :default_strategy => :stub do |f|
  f.add_attribute :id, '2d1244e8-e338-102c-a92d-40402145ee8b'
end

Factory.define :subscription, :class => Mousetrap::Subscription, :default_strategy => :stub do |f|
  f.plan_code 'TEST'
  f.billing_first_name { random_string }
  f.billing_last_name { random_string }
  f.credit_card_number '4111111111111111'
  f.credit_card_expiration_month '12'
  f.credit_card_expiration_year '2012'
  f.billing_zip_code '90210'
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
hashrocket-mousetrap-0.2.0 spec/factories.rb
hashrocket-mousetrap-0.2.1 spec/factories.rb
hashrocket-mousetrap-0.3.0 spec/factories.rb
mousetrap-0.3.3 spec/factories.rb