1

Hi
Given I have a webservice which accepts file uploads.
And I want to test it in Cucumber
When I put the following code in Step Definition
post '/webservice', 'picture[file]' => File.new(Rails.root.join(@path_to_file), 'rb')
Then I should see the saved file

Unfortunately, this is not the case.
Any help would be greatly appreciated.

Art Shayderov
  • 5,002
  • 1
  • 26
  • 33

1 Answers1

0

Sorry, I should be using fixture_file_upload.
How do I test a file upload in rails?

Community
  • 1
  • 1
Art Shayderov
  • 5,002
  • 1
  • 26
  • 33