lib/micronaut/matchers/satisfy.rb in spicycode-micronaut-0.1.2 vs lib/micronaut/matchers/satisfy.rb in spicycode-micronaut-0.1.3
- old
+ new
@@ -1,9 +1,10 @@
module Micronaut
module Matchers
class Satisfy #:nodoc:
+
def initialize(&block)
@block = block
end
def matches?(given, &block)
@@ -17,10 +18,11 @@
end
def negative_failure_message
"expected #{@given} not to satisfy block"
end
+
end
# :call-seq:
# should satisfy {}
# should_not satisfy {}
@@ -41,7 +43,8 @@
# n > 3
# }
def satisfy(&block)
Matchers::Satisfy.new(&block)
end
+
end
end