Sha256: 690d188b76ab09b0ee011fdb2293d23259a875e4778ec6c0731880f41180e6e7

Contents?: true

Size: 1.12 KB

Versions: 18

Compression:

Stored size: 1.12 KB

Contents

require 'rspec'
require "rspec/core/rake_task"
require "rack/test"
require "ci/reporter/rake/rspec"


namespace "spec" do
  RSpec::Core::RakeTask.new("unit") do |t|
    t.rspec_opts = ["--format", "documentation", "--colour"]
    t.pattern = "**/unit/**/*_spec.rb"
  end

  RSpec::Core::RakeTask.new("integration") do |t|
    t.rspec_opts = ["--format", "documentation", "--colour"]
    t.pattern = "**/integration/**/*_spec.rb"
  end

  desc "Run specs with code coverage"
  task :rcov => ["ci:setup:rspec"] do
    require 'simplecov'
    require 'simplecov-rcov'
    require 'simplecov-csv'

    FileUtils.rm_rf File.join('.', "coverage")

    SimpleCov.start do
      if ENV["FORMAT"] == "csv"
        SimpleCov.formatter = SimpleCov::Formatter::CSVFormatter
      else
        SimpleCov.formatter = SimpleCov::Formatter::RcovFormatter
      end
      
      SimpleCov.coverage_dir(ENV["COVERAGE_REPORTS"])
      root '.'

      add_filter "/spec/"

      RSpec::Core::Runner.disable_autorun!
      exit 1 unless RSpec::Core::Runner.run(['spec/unit'], STDERR, STDOUT) == 0
    end
  end

end

task :default => [:spec]
task :spec => ['spec:unit']

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
nurego-1.1.22 Rakefile
nurego-1.1.21 Rakefile
nurego-1.1.20 Rakefile
nurego-1.1.19 Rakefile
nurego-1.1.18 Rakefile
nurego-1.1.17 Rakefile
nurego-1.1.16 Rakefile
nurego-1.1.15 Rakefile
nurego-1.1.14 Rakefile
nurego-1.1.13 Rakefile
nurego-1.1.12 Rakefile
nurego-1.1.11 Rakefile
nurego-1.0.10 Rakefile
nurego-1.0.9 Rakefile
nurego-1.0.8 Rakefile
nurego-1.0.7 Rakefile
nurego-1.0.6 Rakefile
nurego-1.0.5 Rakefile