RuntimeError: can't modify frozen Array when running rspec in rails 5.1

前端 未结 14 2121
面向向阳花
面向向阳花 2021-01-03 20:10

I recently upgraded to Rails 5.1 from v4.3 and am now getting this error when running tests:

An error occurred while loading 

./spec/controllers/admin/capac         


        
14条回答
  •  日久生厌
    2021-01-03 21:01

    In my case it was due to a git conflict message (the one like >>>> ... === ... <<<<) that I missed to resolve, so there was a syntax error when Rspec has been trying to load that class.

    --fail-fast command line option does not help in this case as the error happens higher in the call stack, but you can see the actual error by just running any single spec file.

提交回复
热议问题