Where should I store methods to make them available both to my application and to RSpec?

前端 未结 3 1229
梦毁少年i
梦毁少年i 2020-12-18 11:42

I need to create some methods that are available both to my application (models, views and controllers) and to RSpec.

Specifically I need to create some path_helper

3条回答
  •  独厮守ぢ
    2020-12-18 11:58

    the Rspec-rails gem seems to support helper testing

    the gem can make helpers available in any of your specs : "Writing specs for your helpers is a snap. Just tell the Example Group the name of the helper and the Example Group will expose an object that includes the helper".

提交回复
热议问题