Rails: How to test code in the lib/ directory?

前端 未结 7 1498

I have a model which gets its data from a parser object. I\'m thinking that the parser class should live in the lib/ directory (although I could be persuaded that it should live

7条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-30 07:08

    Use:

    [spring] rake test:all
    

    to run all tests, including the directories you created (like [root]/test/lib/).

    Omit [spring] if tou aren't using it.

提交回复
热议问题