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

后端 未结 10 675
梦如初夏
梦如初夏 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:33

    Make sure you installed the GEM and you added the following line either in your environment.rb or test.rb file.

    config.gem "thoughtbot-factory_girl", :lib => "factory_girl", :source => "http://gems.github.com"
    

提交回复
热议问题