spree/spree — pull request #1984 by iloveitaly (2012-09-18 17:42:05+00:00)
Title: Allow Multiple Promotions to be Associated With a Product

This eliminates the restriction (detailed in #1857) preventing a product from having multiple promotions associated with it via the product rule.

* Removed restriction preventing the creation of multiple promotions using the same product in their rule
* Moved the `ActiveSupport::Notifications.subscribe` call from the core engine to the promo engine
* Moved the notification handler into a class method on `Spree::Promotion`. I'm not aware of any plugins using `Spree::Activator` but this change + new notification handler will probably break anything custom built on top of `Spree::Activator`.
* Removed restriction preventing promotions from being applied if they were created after the order. A customer can still get the promotion to apply, they just have to empty their cart and readd the item (bad UX). Am I missing any regression that might occur by removing this?
* Refactored the promo spec code, removed some unneeded test cases, and added some additional test cases

All tests pass, and the change seems to work well enough, but my hunch is that test coverage for the promotional system isn't robust enough and I'm missing some edge case somewhere.

Thoughts?