【问题标题】:How to use Rspec + Guard+Glow+Spork on multiple test folder(spec and capybara)如何在多个测试文件夹(规范和水豚)上使用 Rspec + Guard+Glow+Spork
【发布时间】:2012-01-01 05:24:34
【问题描述】:

我正在尝试在我的 ruby​​ on rails 测试在 mac 上设置 Rspec + guard+glow+spork。它们在我的“规范”目录上工作得很好。

但是我有一个不同的文件夹,带有单独的助手来存储 capybara test 。我应该怎么做才能配置guard+glow+spork,让它们一次在两个测试文件夹上工作'guard start'。

这是我的目录结构简介

-应用程序\

----规格\

------spec_helper.rb

----场景\

------scenario_helper.rb

【问题讨论】:

    标签: ruby-on-rails rspec capybara spork guard


    【解决方案1】:

    您可以为两条路径创建两个不同的组...

        # in your Guardfile
        group 'acceptance-tests' do
          guard 'rspec', :spec_paths => ['scenarios/'] do
            # ...
          end
        end
    
        group 'unit-tests' do
          guard 'rspec', :spec_paths => ['spec/models', 'spec/controllers', 'spec/routing'] do
            # ...
          end
        end
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-10-05
      • 1970-01-01
      • 2011-06-24
      • 2012-06-24
      • 2012-05-27
      • 1970-01-01
      • 2010-09-13
      • 2011-12-11
      相关资源
      最近更新 更多