【发布时间】:2012-03-09 13:18:29
【问题描述】:
例如,如果我有 ./views/*_spec 那么我可以使用渲染功能。但是,如果我想使用 ./integrations/*_spec 中的渲染功能怎么办?我怎样才能做到这一点?
【问题讨论】:
标签: rspec2 rspec-rails
例如,如果我有 ./views/*_spec 那么我可以使用渲染功能。但是,如果我想使用 ./integrations/*_spec 中的渲染功能怎么办?我怎样才能做到这一点?
【问题讨论】:
标签: rspec2 rspec-rails
解决方案是将 RSpec 中的模块包含到描述块中
include RSpec::Rails::ViewExampleGroup
【讨论】: