Created
January 9, 2013 08:29
-
-
Save all4miller/4491574 to your computer and use it in GitHub Desktop.
file attachements
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
require 'spec_helper' | |
describe SomeController do | |
def file_attachment | |
test_document = "#{Rails.root}/spec/support/file.csv" | |
Rack::Test::UploadedFile.new(test_document, "text/csv") | |
end | |
describe "POST to #import" do | |
before do | |
post :import, file: file_attachment | |
end | |
it {should redirect_to some_path } | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment