Paperclip::Storage::Fake
stubs out all Paperclip IO operation. Useful in specs.
Faster specs. How much do you actually test the content of attachments in your model specs?
Add this line to your application's Gemfile:
gem 'paperclip-fake-storage'
And then execute:
$ bundle
Or install it yourself as:
$ gem install paperclip-fake-storage
In your config/environments/test.rb
file:
config.paperclip_defaults = { storage: :fake }
- Fork it ( https://github.com/[my-github-username]/paperclip-fake-storage/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request