Sha256: 574f05242da1933922ed12c825235c0d825cd7bace92b2bc023211b12fb813c5
Contents?: true
Size: 1.91 KB
Versions: 2
Compression:
Stored size: 1.91 KB
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.company { random_string } f.code { |me| me.email } f.add_attribute :id, nil f.subscription_attributes { Factory.attributes_for :subscription } end Factory.define :alt_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.company { random_string } f.code { |me| me.email } f.add_attribute :id, nil f.subscription_attributes { Factory.attributes_for :i8l_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 Factory.define :i8l_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_country 'GB' f.billing_adddress "1 Upper Littleton\nWinford" f.city "Winford" f.state "Bristol" f.billing_zip_code 'NR25 7HG' end Factory.define :alternate_subscription, :parent => :subscription, :default_strategy => :stub do |f| f.credit_card_number '5555555555554444' f.credit_card_expiration_month '7' f.credit_card_expiration_year '2013' f.billing_zip_code '12345' end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
madebyrocket-mousetrap-0.5.3.8 | spec/factories.rb |
madebyrocket-mousetrap-0.5.3.7 | spec/factories.rb |