Where do rspec tests for code under lib/ go?

前端 未结 1 1562
北恋
北恋 2021-02-05 01:43

I\'ve got some code in the lib/ directory that don\'t really belong under controls, models or helpers. I\'d like to write some rspec tests for this code, but am not sure where

1条回答
  •  梦如初夏
    2021-02-05 02:38

    I would use a subdirectory of /spec as well. However, I would consider refactoring the code into a separate plugin or gem if it is really separate and can be tested standalone. In this plugin, you can create a separate spec-directory.

    0 讨论(0)
提交回复
热议问题