Commit c295d10ed3e5125410291a89d0f019752d93fa62

Authored by Rafael Martins
1 parent 46afe600

Replaced 'execute' on rake tasks for 'reenable' + 'invoke' to call deps

Showing 1 changed file with 10 additions and 6 deletions   Show diff stats
lib/tasks/test.rake
@@ -23,18 +23,22 @@ namespace :test do @@ -23,18 +23,22 @@ namespace :test do
23 ENV['RAILS_ENV'] = 'test' 23 ENV['RAILS_ENV'] = 'test'
24 # force the solr tasks to run with each individual test task 24 # force the solr tasks to run with each individual test task
25 override_task test_task do 25 override_task test_task do
26 - Rake::Task['solr:start'].execute  
27 - Rake::Task["#{orig_name}:original"].execute  
28 - Rake::Task['solr:stop'].execute 26 + Rake::Task['solr:start'].reenable
  27 + Rake::Task['solr:start'].invoke
  28 + Rake::Task["#{orig_name}:original"].invoke
  29 + Rake::Task['solr:stop'].reenable
  30 + Rake::Task['solr:stop'].invoke
29 end 31 end
30 end 32 end
31 end 33 end
32 (CucumberTasks + NoosferoTasks).each do |test_task| 34 (CucumberTasks + NoosferoTasks).each do |test_task|
33 ENV['RAILS_ENV'] = 'test' 35 ENV['RAILS_ENV'] = 'test'
34 override_task test_task do 36 override_task test_task do
35 - Rake::Task['solr:start'].execute  
36 - Rake::Task["#{test_task}:original"].execute  
37 - Rake::Task['solr:stop'].execute 37 + Rake::Task['solr:start'].reenable
  38 + Rake::Task['solr:start'].invoke
  39 + Rake::Task["#{test_task}:original"].invoke
  40 + Rake::Task['solr:stop'].reenable
  41 + Rake::Task['solr:stop'].invoke
38 end 42 end
39 end 43 end
40 44