Sha256: 1280c3a4d5bdac62268d6a154c97d4748846623718670026dc797f733ca0e3e0

Contents?: true

Size: 1.09 KB

Versions: 3

Compression:

Stored size: 1.09 KB

Contents

require 'bundler/gem_tasks'

# Style Tests
begin
  require 'rubocop/rake_task'
  RuboCop::RakeTask.new do |t|
    t.formatters = ['progress']
    t.options = ['-D']
    t.patterns = %w(
      lib/**/*.rb
      spec/**/*.rb
      ./Rakefile
    )
  end

  # style is an alias for rubocop
  task style: :rubocop
rescue LoadError
  puts 'Rubocop not available; disabling rubocop tasks'
end

# Unit Tests
begin
  require 'rspec/core/rake_task'
  RSpec::Core::RakeTask.new

  # Coverage
  desc 'Generate unit test coverage report'
  task :coverage do
    ENV['COVERAGE'] = 'true'
    Rake::Task[:spec].invoke
  end
rescue LoadError
  puts 'RSpec not available; disabling rspec tasks'
  # create a no-op spec task for :default
  task :spec
end

# Feature Tests
begin
  require 'cucumber'
  require 'cucumber/rake/task'
  Cucumber::Rake::Task.new(:features)
rescue LoadError
  puts 'Cucumber/Aruba not available; disabling feature tasks'
  # create a no-op spec task for :default
  task :features
end

# test or the default task runs spec and features
desc 'run all tests'
task default: [:spec, :features]
task test: :default

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
chef-vault-2.6.1 Rakefile
chef-vault-2.6.0 Rakefile
chef-vault-2.5.0 Rakefile