mongoid/mongoid — pull request #1969 by burgalon (2012-05-02 16:38:03+00:00)
Title: Issue #1967: spec for where(key: array)

This commit adds a spec which is trying to retrieve a record with the exact same array of ids (i.e: not $in).
The problem seems to be related to the has_many_belongs_to relationship.
Notice how the 'agent_ids' variable is changed and wrapper in another array after the call to where(...)