Mocking file uploads in Rails 3.1 controller tests

前端 未结 3 1571
一个人的身影
一个人的身影 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:39

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

提交回复
热议问题