Mocking file uploads in Rails 3.1 controller tests

前端 未结 3 1094
旧时难觅i
旧时难觅i 2021-02-15 04:08

My controller accesses the tempfile attribute of an uploaded file and passes it to another mocked component. My test code has

  @file = mock(Object)         


        
3条回答
  •  清歌不尽
    2021-02-15 04:35

    I made a pull request to fix this issue, please +1 if you like it: https://github.com/brynary/rack-test/pull/67

提交回复
热议问题