In some Rspec model specs, we have several tests like this:
it { should have_many(:labels) }
Unfortunately, we also have a hook that runs before validation which causes an error when the object hasn’t been set up.
Is it possible for me to set the value of “it” for these tests? I want to give it a properly initialized object so that my pre-validation hooks don’t cause problems.
Like this?