Please note am fairly new, so if this is a silly question my apologies.
I was moving programming along making some changes to one of my models using TDD. I started to get this message out of rspec:
Failure/Error: expect(factory).to be_valid, factory.errors.full_messages.join(’,’)
I am assuming that this is due to a model change that my factory has become invalid. However, I can not seem to get to a valid state.
Here is my model:
class Item < ActiveRecord::Base belongs_to :user validates :name, presence: true validates :sku, presence: true end
Here is my factory:
FactoryGirl.define do factory :item do name "factory_name" description "factory_description" user nil sku "factory_sku" end end
What I wold like to know is:
Am I on the right track?
How do I go about troubleshooting this?
Thanks in advance!!