Skip to content

Instantly share code, notes, and snippets.

@technicalpickles
Created September 3, 2008 21:50
Show Gist options
  • Save technicalpickles/8676 to your computer and use it in GitHub Desktop.
Save technicalpickles/8676 to your computer and use it in GitHub Desktop.
module AttachmentFuMacros
def should_have_attachment()
klass = model_class
should "define AttachmentFu class methods" do
# breakpoint
class_modules = (class << klass; included_modules; end)
assert class_modules.include?(Technoweenie::AttachmentFu::ClassMethods),
"#{klass} doesn't define AttachmentFu class methods"
end
should "define AttachmentFu instance methods" do
instance_modules = klass.included_modules
assert instance_modules.include?(Technoweenie::AttachmentFu::InstanceMethods),
"#{klass} doesn't define AttachmentFu instance methods"
end
end
end
Test::Unit::TestCase.extend(AttachmentFuMacros)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment