Skip to content

Instantly share code, notes, and snippets.

@JakubOboza
Created May 31, 2012 15:55
Show Gist options
  • Save JakubOboza/2844363 to your computer and use it in GitHub Desktop.
Save JakubOboza/2844363 to your computer and use it in GitHub Desktop.
RSpec::Matchers.define :be_a_multiple_of do |expected|
match do |actual|
actual % expected == 0
end
end
RSpec::Matchers.define :be_a_multiple_of_2 do
match do |actual|
actual % 2 == 0
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment