File: Rakefile

package info (click to toggle)
ruby-specinfra 2.89.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,412 kB
  • sloc: ruby: 10,338; sh: 4; makefile: 4
file content (48 lines) | stat: -rw-r--r-- 1,180 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
require "bundler/gem_tasks"
begin
  require "rspec/core/rake_task"
  require "octorelease"
rescue LoadError
end

if defined?(RSpec)
  task :spec => 'spec:all'
  task :default => 'spec:all'

  namespace :spec do
    task :all => [ :helper, :backend, :configuration, :processor, :command, :host_inventory ]

    RSpec::Core::RakeTask.new(:helper) do |t|
      t.pattern = "spec/helper/**/*_spec.rb"
    end

    task :backend => 'backend:all'
    namespace :backend do
      backends = Dir.glob("spec/backend/*").map { |path| File.basename(path) }

      task :all => backends

      backends.each do |backend|
        RSpec::Core::RakeTask.new(backend) do |t|
          t.pattern = "spec/backend/#{backend}/*_spec.rb"
        end
      end
    end

    RSpec::Core::RakeTask.new(:configuration) do |t|
      t.pattern = "spec/configuration_spec.rb"
    end

    RSpec::Core::RakeTask.new(:processor) do |t|
      t.pattern = "spec/processor_spec.rb"
    end

    RSpec::Core::RakeTask.new(:command) do |t|
      t.pattern = "spec/command/**/*.rb"
    end

    RSpec::Core::RakeTask.new(:host_inventory) do |t|
      t.pattern = "spec/host_inventory/**/*_spec.rb"
    end
  end
end