Permalink
Browse files

add a test for rule condition with proc

  • Loading branch information...
1 parent d3c73c4 commit 7ee78982a555062e71689e775decc349bb289171 @timoschilling timoschilling committed Dec 13, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 spec/cancan/rule_spec.rb
View
@@ -49,4 +49,10 @@
@conditions = {}
@rule.should_not be_unmergeable
end
+
+ it "should execute proc conditions" do
+ @conditions[:foo] = proc { 1 }
+ @conditions[:bar] = 2
+ @rule.conditions.should == {:foo => 1, :bar => 2}
+ end
end

0 comments on commit 7ee7898

Please sign in to comment.