【问题标题】:How does rspec-rails detects folders?rspec-rails 如何检测文件夹?
【发布时间】:2012-03-09 13:18:29
【问题描述】:

例如,如果我有 ./views/*_spec 那么我可以使用渲染功能。但是,如果我想使用 ./integrations/*_spec 中的渲染功能怎么办?我怎样才能做到这一点?

【问题讨论】:

    标签: rspec2 rspec-rails


    【解决方案1】:

    解决方案是将 RSpec 中的模块包含到描述块中

    include RSpec::Rails::ViewExampleGroup
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-01-17
      • 1970-01-01
      • 2011-11-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多