Created
November 17, 2011 00:45
-
-
Save dakatsuka/1372022 to your computer and use it in GitHub Desktop.
Paperclipを使っているモデルをテストする時にファイルを保存しないようにする
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
RSpec.configure do |config| | |
config.mock_with :rr | |
config.before do | |
any_instance_of User do |u| | |
stub(u).save_attached_files { true } | |
stub(u).destroy_attached_files { true } | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment