Ruby on Rails - ActiveRecord::Relation count method is wrong?
问题 I'm writing an application that allows users to send one another messages about an 'offer'. I thought I'd save myself some work and use the Mailboxer gem. I'm following a test driven development approach with RSpec. I'm writing a test that should ensure that only one Conversation is allowed per offer. An offer belongs_to two different users (the user that made the offer, and the user that received the offer). Here is my failing test: describe "after a message is sent to the same user twice"