mirror of
https://github.com/puppetlabs/vmfloaty.git
synced 2026-01-26 13:28:42 -05:00
31 lines
761 B
Ruby
31 lines
761 B
Ruby
# frozen_string_literal: true
|
|
|
|
require 'rubygems'
|
|
require 'bundler/setup'
|
|
require 'rspec/core/rake_task'
|
|
require 'rubocop/rake_task'
|
|
|
|
# Immediately sync all stdout so that tools like buildbot can
|
|
# immediately load in the output.
|
|
$stdout.sync = true
|
|
$stderr.sync = true
|
|
|
|
# Change to the directory of this file.
|
|
Dir.chdir(File.expand_path('../', __FILE__))
|
|
|
|
# This installs the tasks that help with gem creation and
|
|
# publishing.
|
|
Bundler::GemHelper.install_tasks
|
|
|
|
# Install the `spec` task so that we can run tests.
|
|
RSpec::Core::RakeTask.new(:spec) do |t|
|
|
t.rspec_opts = '--order defined'
|
|
end
|
|
|
|
desc 'Run RuboCop'
|
|
RuboCop::RakeTask.new(:rubocop) do |task|
|
|
task.options << '--display-cop-names'
|
|
end
|
|
|
|
# Default task is to run the unit tests
|
|
task default: :spec
|