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