I have a 4 rail check for my user model:
has_many :items, -> { order(:position) }
I was expecting the following assistant to work:
it {should have_many(:items).order(:position)}
But this causes this error:
Expected User to have a has_many association called items (items should be ordered by position)
Is my syntax wrong for the test?
source
share