“Could not find a valid mapping for #” only on second and successive tests

后端 未结 9 1914
花落未央
花落未央 2020-12-28 13:28

I\'m trying to write a request test that asserts that the proper links appear on the application layout depending in whether a user is logged in or out. FWIW, I\'m using Dev

9条回答
  •  被撕碎了的回忆
    2020-12-28 14:19

    Just in case anyone else runs into this, for the same reason as me - I had the same problem on basically all my tests after a change to some config files - it turned out it was due to RAILS_ENV being set to development when I ran the tests by accident. Might be worth checking before adding a test-specific rails initializer :-)

提交回复
热议问题