How to import Rails helpers in to the functional tests

前端 未结 4 2017
谎友^
谎友^ 2021-01-19 16:48

Hi I recently inherited a project in which the former dev was not familiar with rails, and decided to put a lot of important logic into the view helpers.

cla         


        
4条回答
  •  一向
    一向 (楼主)
    2021-01-19 17:03

    Why re-factor? You can very easily include helpers from your project in your tests. I did the following to do so.

    require_relative '../../app/helpers/import_helper'
    

提交回复
热议问题