A rule to limit a promotion use to once per account.
Add spree_one_use_code_promotion_rule to your Gemfile:
gem 'spree_one_use_code_promotion_rule', github: "Hates/spree_one_use_code_promotion_rule"
Bundle your dependencies and run the installation generator:
bundle
bundle exec rails g spree_one_use_code_promotion_rule:install
Be sure to bundle your dependencies and then create a dummy test app for the specs to run against.
bundle
bundle exec rake test_app
bundle exec rspec spec
When testing your applications integration with this extension you may use it's factories. Simply add this require statement to your spec_helper:
require 'spree_one_use_code_promotion_rule/factories'