Commit a724efacd593dcdaf6d9ca99860be13a8dd176aa
1 parent
fa28302c
Exists in
web_steps_improvements
and in
6 other branches
cucumber.yml: Improve format
Showing
1 changed file
with
15 additions
and
10 deletions
Show diff stats
config/cucumber.yml
1 | -<% base_requires = '-r features/support -r features/step_definitions' %> | ||
2 | -<% default_options = "--format progress --strict --tags ~@selenium --tags ~@selenium-fixme --tags ~@fixme --exclude features/support/selenium.rb #{base_requires}" %> | ||
3 | <% | 1 | <% |
4 | - default_options += ' --color' if $stdout.isatty | 2 | + base_requires = '-r features/support -r features/step_definitions' |
3 | + default_options = "--format progress --strict --tags ~@selenium --tags ~@selenium-fixme --tags ~@fixme --exclude features/support/selenium.rb #{base_requires}" | ||
4 | + default_options << ' --color' if $stdout.isatty | ||
5 | + selenium_options = "--strict --tags @selenium #{base_requires}" | ||
5 | %> | 6 | %> |
6 | -<% selenium_options = "--strict --tags @selenium #{base_requires}" %> | ||
7 | 7 | ||
8 | default: <%= default_options %> | 8 | default: <%= default_options %> |
9 | selenium: <%= selenium_options %> | 9 | selenium: <%= selenium_options %> |
10 | 10 | ||
11 | -<% enabled_plugins = Dir.glob(File.join('config', 'plugins', '*')).map{|path| plugin = File.basename(path); plugin if File.exist?(File.join('features', 'plugins', plugin)) }.compact %> | 11 | +<% |
12 | + enabled_plugins = Dir.glob(File.join('config', 'plugins', '*')).map do |path| | ||
13 | + plugin = File.basename(path) | ||
14 | + plugin if File.exist? File.join('features', 'plugins', plugin) | ||
15 | + end.compact | ||
12 | 16 | ||
13 | -<% enabled_plugins.each do |plugin| %> | ||
14 | -<% plugin_features_path = File.join('features', 'plugins', plugin) %> | ||
15 | -<% plugin_base_requires = '' %> | ||
16 | -<% plugin_base_requires += " -r features/plugins/#{plugin}/support" if File.exist?(File.join(plugin_features_path, 'support')) %> | ||
17 | -<% plugin_base_requires += " -r features/plugins/#{plugin}/step_definitions" if File.exist?(File.join(plugin_features_path, 'step_definitions')) %> | 17 | + enabled_plugins.each do |plugin| |
18 | + plugin_features_path = File.join('features', 'plugins', plugin) | ||
19 | + plugin_base_requires = '' | ||
20 | + plugin_base_requires << " -r features/plugins/#{plugin}/support" if File.exist? File.join(plugin_features_path, 'support') | ||
21 | + plugin_base_requires << " -r features/plugins/#{plugin}/step_definitions" if File.exist? File.join(plugin_features_path, 'step_definitions') | ||
22 | +%> | ||
18 | <%= "#{plugin}: #{default_options} #{plugin_base_requires}" %> | 23 | <%= "#{plugin}: #{default_options} #{plugin_base_requires}" %> |
19 | <%= "#{plugin}_selenium: #{selenium_options} #{plugin_base_requires}" %> | 24 | <%= "#{plugin}_selenium: #{selenium_options} #{plugin_base_requires}" %> |
20 | <% end %> | 25 | <% end %> |