Skip to content

Instantly share code, notes, and snippets.

@theconektd
Created October 8, 2010 23:24
Show Gist options
  • Select an option

  • Save theconektd/617721 to your computer and use it in GitHub Desktop.

Select an option

Save theconektd/617721 to your computer and use it in GitHub Desktop.
def rhyme_with(expected)
simple_matcher do |given, matcher|
matcher.description = "rhyme with #{expected.inspect}"
matcher.failure_message = "expected #{given.inspect} to rhyme with #{expected.inspect}"
matcher.negative_failure_message = "expected #{given.inspect} not to rhyme with #{expected.inspect}"
given.rhymes_with? expected
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment