How to run Rails console in the test environment and load test_helper.rb?

后端 未结 10 678
梦如初夏
梦如初夏 2020-12-12 19:58

The background: I\'m having some problems with Thoughtbot\'s \"Factory Girl\" gem, with is used to create objects to use in unit and other tests. I\'d like to go to the cons

10条回答
  •  抹茶落季
    2020-12-12 20:46

    For Rails 5.2.0: "Passing the environment's name as a regular argument is deprecated and will be removed in the next Rails version. Please, use the -e option instead."

    rails c -e test
    

提交回复
热议问题