Testing Rake tasks
Testing Rake tasks
为了使测试 Rake 任务更容易一些,可以使用一个辅助程序来代替标准 Spec 辅助程序. 代替 ,使用require 'rake_helper'
. 该帮助程序包括为您提供的 ,并配置了一些其他内容以使测试 Rake 任务更加容易.
RakeHelpers
模块公开了方法以简化执行任务. 有关所有可用方法,请参见spec/support/helpers/rake_helpers.rb
.
本文档使用 BookStack 构建