Created
July 17, 2013 04:48
-
-
Save joshmcarthur/6017767 to your computer and use it in GitHub Desktop.
How to send a file object in a POST request with RSpec and Rack::Test
This file contains hidden or 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
| post :create, | |
| splash_screen: { | |
| image: Rack::Test::UploadedFile.new(Rails.root.join("spec/assets/example_splash_screen.jpg"), 'image/jpg') | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment