mdsol/the_policy_machine — pull request #4 by HonoreDB (2013-10-30 17:28:20+00:00)
Title: Fix/enforce uniqueness of operation set

Turns out a degenerate project using this gem can pass in a Set of PM::Operation in which the persisted policy elements are not themselves a unique set. This in turn triggers bad Rails behavior where it assumes a has_and_belongs_to_many collection is unique and naively iterates over it. We can defend against this by enforcing uniqueness on the operation set within the policy machine.

Finished in 1 minute 5.9 seconds
699 examples, 0 failures, 4 pending