Topic: more errors [SOLVED]
1) User when First Name is too long
Failure/Error: before { User.first_name = "a" * 210 }
NoMethodError:
undefined method `first_name=' for #<Class:0x007ffbc68f9ca0>
# ./spec/models/user_spec.rb:28:in `block (3 levels) in <top (required)>
describe "when First Name is too long" do
before { User.first_name = "a" * 21 }
it { should_not be_valid }
endnow when i go to rails c
Loading development environment (Rails 3.2.3)
User
=> User(id: integer, email: string, encrypted_password: string, reset_password_token: string, reset_password_sent_at: datetime, remember_created_at: datetime, sign_in_count: integer, current_sign_in_at: datetime, last_sign_in_at: datetime, current_sign_in_ip: string, last_sign_in_ip: string, created_at: datetime, updated_at: datetime, username: string, account_id: integer, first_name: string, last_name: string)
i can see that first_name is there
Last edited by moiseszaragoza (2012-05-22 21:43:57)