File: Rakefile

package info (click to toggle)
ruby-serverspec 2.41.8-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid
  • size: 976 kB
  • sloc: ruby: 4,806; makefile: 3
file content (31 lines) | stat: -rw-r--r-- 672 bytes parent folder | download | duplicates (4)
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
require "bundler/gem_tasks"
begin
  require "rspec/core/rake_task"
  require "octorelease"
rescue LoadError
end

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

  namespace :spec do
    task :all => [ 'spec:type:all', 'spec:helper' ]

    namespace :type do
      oses = Dir.glob('spec/type/*').map {|d| File.basename(d)}

      task :all => oses.map {|os| "spec:type:#{os}" }

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

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