Guest User

Untitled

a guest
Feb 19th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. # attachment_fu spec helper.
  2. #
  3. # Usage:
  4. #
  5. # before(:all) do
  6. # before_attachment_fu(Avatar)
  7. # end
  8. #
  9. # it "should do weird stuff with avatar" do
  10. # avatar = Avatar.new
  11. #
  12. # ...
  13. # end
  14.  
  15. def before_attachment_fu(klass)
  16. klass.attachment_options[:storage] = :file_system
  17. klass.any_instance.expects(:save_to_storage).returns(true)
  18. klass.any_instance.expects(:process_attachment).returns(true)
  19. end
Add Comment
Please, Sign In to add comment