Skip to content

Instantly share code, notes, and snippets.

@joshmcarthur
Created July 17, 2013 04:48
Show Gist options
  • Save joshmcarthur/6017767 to your computer and use it in GitHub Desktop.
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
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