2012-01-07 52 views

回答

0

我最终只使用请求目录 - 意识到我的调用目录“一体化”的偏好是不值得的努力寻求这出。

这可能是拙劣的形式来纪念这个作为答案..让我知道

1

您可以修改spec_helper。例如,在您的rspec配置中添加水豚就足够了。

RSpec.configure do |config| 
    config.include Capybara::DSL, type: :integration 
end 

然后,你可以添加自己的助手:

RSpec.configure do |config| 
    config.with_options example_group: { file_path: /\bspec\/integration\// } do |integration| 
     integration.include SomeIntegrationHelper 
    end 
end 
+0

感谢您的答复 - 但这看起来并不像它将使RSpec的发电机倾倒在集成目录新的测试 - 也许这是不可能的? – 2012-01-09 02:19:47

+0

不幸的是,我看到的硬件代码是dir: https://github.com/rspec/rspec-rails/blob/master/lib/generators/rspec/integration/integration_generator.rb – pdjota 2012-01-15 00:27:42

相关问题