tuxedio/tuxedo-proto — pull request #33 by ianks (2014-04-11 04:22:42+00:00)
Title: Add customer model with tests and migrations

Here is a working customer model with tests and migrations.

After some thought and talking to some people, I decided to use Rails' SIngle Table Inheritance (STI) in order to allow customers to inherit properties from users. Since customers and users share a single table, :bio and users top3 picks are migrated to User table, but validated in the customer model (since they are unique to customer).

Currently, "top3 should be invalid test" (rightfully) fails because later it will depend on available vendors.

One test wrongfully fails. There seems to be some sort of odd bug with RSpec (possibly due to STI?), or I am missing something obvious and you guys can make me feel dumb :smile:

``` Failure/Error: before { @customer = Customer.new(
ArgumentError:
wrong number of arguments (0 for 1)
# ./app/models/user.rb:31:in `hash'
# ./app/models/customer.rb:1:in `'
# ./spec/models/customer_spec.rb:4:in `block (2 levels) in '```