File: Rakefile

package info (click to toggle)
ruby-fog-openstack 1.0.8-2.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 5,132 kB
  • sloc: ruby: 36,411; makefile: 5; sh: 4
file content (41 lines) | stat: -rw-r--r-- 927 bytes parent folder | download | duplicates (2)
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
require 'bundler/gem_tasks'
require 'rubocop/rake_task'
require 'rake/testtask'

RuboCop::RakeTask.new

task :default => ['tests:mock', 'tests:spec', 'tests:unit']

task :mock => 'tests:mock'

task :spec => "tests:spec"

task :unit => 'tests:unit'

namespace :tests do
  desc 'Run fog-openstack tests with Mock class'
  Rake::TestTask.new do |t|
    ENV['FOG_MOCK']= ENV['FOG_MOCK'].nil? ? 'true' : ENV['FOG_MOCK']

    t.name = 'mock'
    t.libs.push [ "lib", "test" ]
    t.test_files = FileList['test/**/*.rb']
    t.verbose = true
  end

  desc 'Run fog-openstack tests with RSpec and VCR'
  Rake::TestTask.new do |t|
    t.name = 'spec'
    t.libs.push [ "lib", "spec" ]
    t.pattern = 'spec/**/*_spec.rb'
    t.verbose = true
  end

  desc 'Run fog-openstack unit tests'
  Rake::TestTask.new do |t|
    t.name = 'unit'
    t.libs.push [ "lib", "unit" ]
    t.pattern = 'unit/**/*_test.rb'
    t.verbose = true
  end
end