Guest User

Untitled

a guest
Feb 19th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. module AttachmentFuMacros
  2. def should_have_attachment()
  3. klass = model_class
  4.  
  5.  
  6. should "define AttachmentFu class methods" do
  7. # breakpoint
  8. class_modules = (class << klass; included_modules; end)
  9. assert class_modules.include?(Technoweenie::AttachmentFu::ClassMethods),
  10. "#{klass} doesn't define AttachmentFu class methods"
  11. end
  12.  
  13. should "define AttachmentFu instance methods" do
  14. instance_modules = klass.included_modules
  15. assert instance_modules.include?(Technoweenie::AttachmentFu::InstanceMethods),
  16. "#{klass} doesn't define AttachmentFu instance methods"
  17. end
  18. end
  19. end
  20. Test::Unit::TestCase.extend(AttachmentFuMacros)
Add Comment
Please, Sign In to add comment