Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # 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
Add Comment
Please, Sign In to add comment