Skip to content

Instantly share code, notes, and snippets.

@dchelimsky
Forked from terrbear/machinist_macro.rb
Created March 21, 2010 14:47
Show Gist options
  • Save dchelimsky/339335 to your computer and use it in GitHub Desktop.
Save dchelimsky/339335 to your computer and use it in GitHub Desktop.
Spec::Matchers.define :have_a_machinist_blueprint do
match do |model|
model.class.respond_to?(:make)
end
description do
"works if there's a valid blueprint"
end
failure_message_for_should do |model|
"expected #{model} to have valid blueprint"
end
failure_message_for_should_not do |model|
"wtf?"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment