spec/patternmatching_spec.rb in patternmatching-0.2.1 vs spec/patternmatching_spec.rb in patternmatching-0.2.2
- old
+ new
@@ -193,6 +193,15 @@
o.bar.should == o
o.name.should == "bar"
o.buzz("buzz").should == o
o.name.should == "buzz"
end
+
+ it "should check pattern with condition" do
+ make(100) do
+ seems as {:a}, with {a > 10} do a end
+ end.should == 100
+ make(1) do
+ seems as {:a}, with {a > 10} do a end
+ end.should == nil
+ end
end