Added specs for Account and Customer.
[merb_mart.git] / spec / spec_fixtures.rb
blobd0d1d1b2b2aaeb37fc747b75a80c6e19ed351358
1 Account.fixture {{
2   :customer => Customer.gen
3 }}
5 Address.fixture {{
6   :first_name   => Random.word(:max => 50),
7   :last_name    => Random.word(:max => 50),
8   :address1     => Random.address,
9   :postal_code  => "%05d" % rand(100_000) + "-%04d" % rand([0, 1_000].random),
10   :company      => (1..4).random.of {Random.word(:max => 25)}.join(' '),
11   :telephone    => Random.phone_number,
12   :address2     => Random.address,
13   :city         => Random.word(:max => 50),
14   :country      => country = Country.gen,
15   :state        => State.gen(:country => country)
18 Country.fixture {{
19   :code => Random.country_code,
20   :name => Random.word(:max => 100, :unique => true)
23 Customer.fixture {{
24   :username => Random.word(:max => 50, :unique => true)
27 Order.fixture {{
28   :order_number => rand(100_000),
29   :tax          => rand * rand(1_000)
32 State.fixture {{
33   :country  => Country.gen,
34   :name     => name = Random.word,
35   :abbr     => name[0, 10]