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 Definitionpost '/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.Sorry, I should be using fixture_file_upload.
How do I test a file upload in rails?
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论