rspec user test gives “undefined local variable or method `confirmed_at' ”
my rspec test is giving me NameError: undefined local variable or method `confirmed_at' for #<User:0xca6ff98> My User spec is: require 'spec_helper' describe User do before(:each) do @user = Factory(:user) end # Factory will make sure that in the future if attributes are added the tests below don't break # Just as long as the Factory is updated for the new attributes as appropriate. context "email is null" do it "record is invalid " do @user.name = nil @user.should_not be_valid end end context "email is unique" do it "record is valid " do @user2 = Factory(:user) @user2 = @user.email @user2