Project

General

Profile

Download (1.02 KB) Statistics
| Branch: | Tag: | Revision:

foreman_pipeline / lib / foreman_pipeline / tasks / foreman_pipeline_test.rake @ be52ca64

1
require File.expand_path("../engine", File.dirname(__FILE__))
2

    
3
namespace :test do
4
  
5
  namespace :foreman_pipeline do
6
    
7
    task :test => ['db:test:prepare'] do
8
      test_task = Rake::TestTask.new('foreman_pipeline_test_task') do |t|
9
        t.libs << ["test", "#{ForemanPipeline::Engine.root}/test"]
10
        t.test_files = ["#{ForemanPipeline::Engine.root}/test/**/*_test.rb"]
11
        t.verbose = true
12
      end
13
      Rake::Task[test_task.name].invoke
14
    end
15

    
16
    task :spec => ['db:test:prepare'] do
17
      test_task = Rake::TestTask.new('foreman_pipeline_spec_task') do |t|
18
        t.libs << ["spec", "#{ForemanPipeline::Engine.root}/spec", "test", "#{ForemanPipeline::Engine.root}/test"]
19
        t.test_files = ["#{ForemanPipeline::Engine.root}/spec/**/*_spec.rb"]
20
        t.verbose = true
21
      end
22
      Rake::Task[test_task.name].invoke
23
    end
24
  end
25

    
26

    
27
  desc "run all plugin's tests"
28
  task :foreman_pipeline do
29
    Rake::Task['test:foreman_pipeline:test'].invoke
30
    Rake::Task['test:foreman_pipeline:spec'].invoke
31
  end
32

    
33
end
34