crowbar/barclamp-crowbar — pull request #335 by jamestyj (2013-01-10 17:32:19+00:00)
Title: Fix 6 failing user spec tests

Fixes the following spec failures:

```
1) User should create a new instance given a valid attribute
Failure/Error: User.create!(@attr)
ActiveRecord::RecordInvalid:
Validation failed: Username can't be blank
# ./spec/models/user_spec.rb:30

2) User should reject duplicate email addresses
Failure/Error: User.create!(@attr)
ActiveRecord::RecordInvalid:
Validation failed: Username can't be blank
# ./spec/models/user_spec.rb:50

3) User should accept valid email addresses
Failure/Error: valid_email_user.should be_valid
expected valid? to return true, got false
# ./spec/models/user_spec.rb:37
# ./spec/models/user_spec.rb:35:in `each'
# ./spec/models/user_spec.rb:35

4) User should reject email addresses identical up to case
Failure/Error: User.create!(@attr.merge(:email => upcased_email))
ActiveRecord::RecordInvalid:
Validation failed: Username can't be blank
# ./spec/models/user_spec.rb:57

5) User password encryption should have an encrypted password attribute
Failure/Error: @user = User.create!(@attr)
ActiveRecord::RecordInvalid:
Validation failed: Username can't be blank
# ./spec/models/user_spec.rb:100

6) User password encryption should set the encrypted password attribute
Failure/Error: @user = User.create!(@attr)
ActiveRecord::RecordInvalid:
Validation failed: Username can't be blank
# ./spec/models/user_spec.rb:100
```