Commit 837c370665fc06cd04db2588bed4608d415734cb
Committed by
Daniela Feitosa
1 parent
6ea5cc36
Exists in
master
and in
29 other branches
Fixing 'missing cucumber and selenium'
Showing
1 changed file
with
10 additions
and
8 deletions
Show diff stats
lib/tasks/plugins_tests.rake
@@ -31,7 +31,7 @@ def run_cucumber(name, profile, files_glob) | @@ -31,7 +31,7 @@ def run_cucumber(name, profile, files_glob) | ||
31 | if files.empty? | 31 | if files.empty? |
32 | puts "I: no tests to run #{name}" | 32 | puts "I: no tests to run #{name}" |
33 | else | 33 | else |
34 | - sh 'xvfb-run', 'ruby', '-S', 'cucumber', '--profile', profile, '--format', ENV['CUCUMBER_FORMAT'] || 'progress' , *features | 34 | + sh 'xvfb-run', 'ruby', '-S', 'cucumber', '--profile', profile, '--format', ENV['CUCUMBER_FORMAT'] || 'progress' , *files |
35 | end | 35 | end |
36 | end | 36 | end |
37 | 37 | ||
@@ -42,14 +42,16 @@ def plugin_test_task(name, plugin, files_glob) | @@ -42,14 +42,16 @@ def plugin_test_task(name, plugin, files_glob) | ||
42 | end | 42 | end |
43 | end | 43 | end |
44 | 44 | ||
45 | -def plugin_cucumber_task(plugin, files_glob) | ||
46 | - task :cucumber => 'db:test:plugins:prepare' do |t| | 45 | +def plugin_cucumber_task(name, plugin, files_glob) |
46 | + desc "Run #{name} tests for #{plugin_name(plugin)}" | ||
47 | + task name => 'db:test:plugins:prepare' do |t| | ||
47 | run_cucumber t.name, :default, files_glob | 48 | run_cucumber t.name, :default, files_glob |
48 | end | 49 | end |
49 | end | 50 | end |
50 | 51 | ||
51 | -def plugin_selenium_task(plugin, files_glob) | ||
52 | - task :selenium => 'db:test:plugins:prepare' do |t| | 52 | +def plugin_selenium_task(name, plugin, files_glob) |
53 | + desc "Run #{name} tests for #{plugin_name(plugin)}" | ||
54 | + task name => 'db:test:plugins:prepare' do |t| | ||
53 | run_cucumber t.name, :selenium, files_glob | 55 | run_cucumber t.name, :selenium, files_glob |
54 | end | 56 | end |
55 | end | 57 | end |
@@ -79,11 +81,11 @@ namespace :test do | @@ -79,11 +81,11 @@ namespace :test do | ||
79 | plugin_test_task :units, plugin, "plugins/#{plugin}/test/unit/**/*.rb" | 81 | plugin_test_task :units, plugin, "plugins/#{plugin}/test/unit/**/*.rb" |
80 | plugin_test_task :functionals, plugin, "plugins/#{plugin}/test/functional/**/*.rb" | 82 | plugin_test_task :functionals, plugin, "plugins/#{plugin}/test/functional/**/*.rb" |
81 | plugin_test_task :integration, plugin, "plugins/#{plugin}/test/integration/**/*.rb" | 83 | plugin_test_task :integration, plugin, "plugins/#{plugin}/test/integration/**/*.rb" |
82 | - plugin_cucumber_task plugin, "plugins/#{plugin}/features/**/*.feature" | ||
83 | - plugin_selenium_task plugin, "plugins/#{plugin}/features/**/*.feature" | 84 | + plugin_cucumber_task :cucumber, plugin, "plugins/#{plugin}/features/**/*.feature" |
85 | + plugin_selenium_task :selenium, plugin, "plugins/#{plugin}/features/**/*.feature" | ||
84 | end | 86 | end |
85 | 87 | ||
86 | - test_sequence_task(plugin, plugin, "#{plugin}:units", "#{plugin}:functionals", "#{plugin}:integration", "#{plugin}:cucumber", "#{plugin}:selenium") # FIXME missing cucumber and selenium | 88 | + test_sequence_task(plugin, plugin, "#{plugin}:units", "#{plugin}:functionals", "#{plugin}:integration", "#{plugin}:cucumber", "#{plugin}:selenium") |
87 | end | 89 | end |
88 | 90 | ||
89 | { :units => :unit , :functionals => :functional , :integration => :integration }.each do |taskname,folder| | 91 | { :units => :unit , :functionals => :functional , :integration => :integration }.each do |taskname,folder| |