Sha256: b9a7a39276fea4bb31d84a3dacf11c25377cf26c28302a4bf2c142fcfdbdddcd

Contents?: true

Size: 893 Bytes

Versions: 6

Compression:

Stored size: 893 Bytes

Contents

exec('bundle', 'exec', $PROGRAM_NAME, *ARGV) unless ENV['BUNDLE_GEMFILE']

require 'bundler/gem_tasks'
require 'rubocop/rake_task'
require 'rspec/core/rake_task'

task default: [:spec, :rubocop]

task spec: [:'spec:unit', :'spec:integration']

def rspec_options(task)
  # output xml if we are running through jenkins
  return unless ENV['JENKINS_HOME']
  opts = [
    '--format RspecJunitFormatter',
    "--out reports/#{task.name}.xml ",
    '--format documentation'
  ]
  task.rspec_opts = opts.join(' ')
end

namespace :spec do
  ENV['COVERAGE'] = 'yes'

  desc 'run unit tests'
  RSpec::Core::RakeTask.new(:unit) do |task|
    rspec_options(task)
    task.pattern = 'spec/unit/**/*_spec.rb'
  end

  desc 'run integration tests'
  RSpec::Core::RakeTask.new(:integration) do |task|
    rspec_options(task)
    task.pattern = 'spec/integration/**/*_spec.rb'
  end
end

RuboCop::RakeTask.new

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
skalera-services-0.2.5 Rakefile
skalera-services-0.2.4 Rakefile
skalera-services-0.2.3 Rakefile
skalera-services-0.2.2 Rakefile
skalera-services-0.2.1 Rakefile
skalera-services-0.2.0 Rakefile