views:

44

answers:

1
+1  Q: 

runing rake task

Hi! Why when i run task :

my_project> rake  import:twitter

Task.path: lib/task/import_twitter.rake

namespace :import do
   task :twitter => :environment do
     puts "importing...."
   end
end

then tests also run?

In the console output:

    importing....
    Loaded suite C:/Ruby/bin/rake
    Started


    Finished in 0.001 seconds.

    0 tests, 0 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifica
    tions
    0% passed

How not to run the tests, when the task is executed?

A: 

Hi You may write your task an then write new one that'll invoke two separate tasks - run tests and yours something like task :run_all => ['db:test:clone ', 'db:test:prepare ', 'test:units', :your_task]

Bohdan Pohorilets