Created
July 30, 2009 21:34
-
-
Save mbbx6spp/158946 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# template for Spec Matcher | |
Spec::Matchers.define :be_an_alien do |planet| | |
match do |creature| | |
creature.alien_of?(planet) | |
end | |
failure_message_for_should do |creature| | |
"expected that #{creature} would be an alien of #{planet}" | |
end | |
failure_message_for_should_not do |creature| | |
"expected that #{creature} would not be an alien of #{planet}" | |
end | |
description do | |
"be an alien of #{planet}" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment