Sha256: ccc72479a0bf3c6a2c64e92b4e48c9f8066299a64164d5fe8c60929cfe849b78

Contents?: true

Size: 973 Bytes

Versions: 1

Compression:

Stored size: 973 Bytes

Contents

#!/usr/bin/env rake

require "bundler/gem_tasks"
require "rdoc/task"
require "rubocop/rake_task"
require "rspec/core/rake_task"

RuboCop::RakeTask.new

namespace :scripts do
  desc "Run the standard script."
  task :standard do
    system("ruby ./test/testable-standard.rb")
  end

  desc "Run the script with a factory."
  task :factory do
    system("ruby ./test/testable-factory.rb")
  end
end

namespace :spec do
  desc "Clean all generated reports."
  task :clean do
    system('rm -rf spec/reports')
  end

  RSpec::Core::RakeTask.new(all: :clean) do |config|
    options  = %w(--color)
    options += %w(--format documentation)
    options += %w(--format html --out spec/reports/unit-test-report.html)

    config.rspec_opts = options
  end
end

Rake::RDocTask.new do |rdoc|
  rdoc.rdoc_dir = 'doc'
  rdoc.main = 'README.md'
  rdoc.title = "Testable #{Testable::VERSION}"
  rdoc.rdoc_files.include('README*', 'lib/**/*.rb')
end

task default: ['spec:all', :rubocop]

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
testable-0.2.0 Rakefile