ref: master
config/cucumber.yml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
<% base_requires = '-r features/support -r features/step_definitions' default_options = "--format progress --strict --tags ~@selenium --tags ~@selenium-fixme --tags ~@fixme --exclude features/support/selenium.rb #{base_requires}" default_options << ' --color' if $stdout.isatty selenium_options = "--strict --tags @selenium #{base_requires}" core_features = Dir.glob "features/**/*.feature" if slice = ENV['SLICE'] sel,size = slice.split '/' size = (core_features.size / size.to_f).ceil core_features = core_features.each_slice(size).to_a[sel.to_i - 1] end core_features = core_features.join ' ' %> default: <%= default_options %> <%= core_features %> selenium: <%= selenium_options %> <%= core_features %> <% enabled_plugins = Dir.glob(File.join('config', 'plugins', '*')).map do |path| plugin = File.basename(path) plugin if File.exist? File.join('features', 'plugins', plugin) end.compact enabled_plugins.each do |plugin| plugin_features_path = File.join('features', 'plugins', plugin) plugin_base_requires = '' plugin_base_requires << " -r features/plugins/#{plugin}/support" if File.exist? File.join(plugin_features_path, 'support') plugin_base_requires << " -r features/plugins/#{plugin}/step_definitions" if File.exist? File.join(plugin_features_path, 'step_definitions') %> <%= "#{plugin}: #{default_options} #{plugin_base_requires}" %> <%= "#{plugin}_selenium: #{selenium_options} #{plugin_base_requires}" %> <% end %> |