Skip to content

Instantly share code, notes, and snippets.

@coreyhaines
Created January 20, 2010 15:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save coreyhaines/281907 to your computer and use it in GitHub Desktop.
Save coreyhaines/281907 to your computer and use it in GitHub Desktop.
def define_simple_predicate_matcher options={}
options.each_pair do |name, predicate|
Spec::Matchers.define name do
match {|actual| actual.send(predicate)}
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment