Skip to content

Commit

Permalink
Fix stubbing methods for promotion eligible rule spec
Browse files Browse the repository at this point in the history
  • Loading branch information
radar committed Oct 21, 2013
1 parent 7a1bf53 commit 703dfb5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/spec/models/spree/promotion_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,8 @@
Spree::PromotionRule.any_instance.stub(:applicable? => true)
true_rule = Spree::PromotionRule.create(:promotion => promotion)
true_rule.stub(:eligible? => true)
promotion.rules << true_rule
promotion.stub(:rules => [true_rule])
promotion.stub_chain(:rules, :for).and_return([true_rule])
promotion.rules_are_eligible?(promotable).should be_true
end

Expand Down

0 comments on commit 703dfb5

Please sign in to comment.