Created
August 26, 2008 09:14
-
-
Save yaroslav/7240 to your computer and use it in GitHub Desktop.
attachment_fu spec helper
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
# attachment_fu spec helper. | |
# | |
# Usage: | |
# | |
# before(:all) do | |
# before_attachment_fu(Avatar) | |
# end | |
# | |
# it "should do weird stuff with avatar" do | |
# avatar = Avatar.new | |
# | |
# ... | |
# end | |
def before_attachment_fu(klass) | |
klass.attachment_options[:storage] = :file_system | |
klass.any_instance.expects(:save_to_storage).returns(true) | |
klass.any_instance.expects(:process_attachment).returns(true) | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment