I am using Factory Girl to create two instances in my model/unit test for a Group. I am testing the model to check that a call to .current returns only the \'current\' groups ac
I prefer this solution from https://github.com/thoughtbot/factory_girl/issues/578.
Inside the factory:
to_create {|instance| instance.save(validate: false) }
EDIT:
As mentioned in the referenced thread, and by other's comments/solutions, you'll likely want to wrap this in a trait block to avoid confusion/issues elsewhere in your tests; for example, when you're testing your validations.