I'm testing the active scope of SystemCommission, I have the following test:
expected = [active, no_starting, no_ending]
expect(SystemCommission.active.map(&:id)).to include expected.map(&:id)
it fails with:
Failure/Error: expect(SystemCommission.active.map(&:id)).to include expected.map(&:id)
expected [1, 2, 3] to include [1, 2, 3]
I had to use the ids because it wasn't matching the objects.
any clues?