There's nothing wrong with the year
value in the factory you've displayed, so my guess would be that one of the associated models you have in this factory also requires a year
and the default factory for that other model doesn't provide it.
With factories always be thinking what other things are happening.
manpreet
Best Answer
2 years ago
When I run my rspec test I receive validation error
year is required
, but in my factory I set year value. I don't know why I receive this error.In my rspec file I invoque this factory with this line