为什么guard同时为rspec和cucumber启动spork,即使我只想为rspec使用组启动它?
在我的档案里为什么guard同时为rspec和cucumber启动spork,即使我只想为rspec使用组启动它?,rspec,cucumber,spork,guard,Rspec,Cucumber,Spork,Guard,在我的档案里 group :development, :test do gem 'capybara', "1.1.2" gem 'database_cleaner', "0.7.0" gem 'cucumber', "1.1.2" gem 'cucumber-rails', "1.2.0" gem 'rspec-rails', "2.7.0" gem 'spork', "0.9.0.rc9" gem 'launchy' #launches the page
group :development, :test do
gem 'capybara', "1.1.2"
gem 'database_cleaner', "0.7.0"
gem 'cucumber', "1.1.2"
gem 'cucumber-rails', "1.2.0"
gem 'rspec-rails', "2.7.0"
gem 'spork', "0.9.0.rc9"
gem 'launchy' #launches the page
gem 'guard-spork', "0.3.1"
gem 'guard-rspec', "0.5.4"
gem 'guard-cucumber', "0.7.4"
gem 'factory_girl_rails'
end
我的Guardfile有两个组(:specs和:features)
当我尝试运行:specs组时,我希望guard只为Rspec运行Spork
guard -g specs start
然而,我可以从输出中看到,guard为Rspec和Cucumber运行Spork
~/current[master]% guard -g specs start
WARNING: You are using Guard outside of Bundler, this is dangerous and may not work. Using `bundle exec guard` is safer.
Guard could not detect any of the supported notification libraries.
Guard is now watching at '/Users/rupert/Desktop/cws-rails'
Starting Spork for RSpec & Cucumber
Using RSpec
Using Cucumber
Preloading Rails environment
Preloading Rails environment
Loading Spork.prefork block...
Loading Spork.prefork block...
Spork is ready and listening on 8990!
Spork is ready and listening on 8989!
Spork server for RSpec & Cucumber successfully started
Guard::RSpec is running, with RSpec 2!
Running all specs
有没有我可能错过的SPORK或guard的配置文件
更新:
必须在RSpec组中禁用Spork中的Cucumber,反之亦然:
specs :specs
guard :spork, :cucumber => false do
# ...
end
end
specs :features
guard 'spork', :rspec => false do
# ...
end
end
我知道它很旧,但我现在也遇到了这个问题,并找到了答案: 我的项目中有一个
features
子目录,其中有一个文件:
features/step\u definitions/email\u steps.rb
查找提交时,我意识到这是从rails_apps_composer:testing framework添加的
因此:
删除子目录功能
可防止spork
尝试使用cucumber
specs :specs
guard :spork, :cucumber => false do
# ...
end
end
specs :features
guard 'spork', :rspec => false do
# ...
end
end