File: rspec.rake

package info (click to toggle)
ruby-addressable 2.8.7-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 712 kB
  • sloc: ruby: 9,421; makefile: 11
file content (23 lines) | stat: -rw-r--r-- 557 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# frozen_string_literal: true

require "rspec/core/rake_task"

namespace :spec do
  RSpec::Core::RakeTask.new(:simplecov) do |t|
    t.pattern = FileList['spec/**/*_spec.rb']
    t.rspec_opts = %w[--color --format documentation] unless ENV["CI"]
  end

  namespace :simplecov do
    desc "Browse the code coverage report."
    task :browse => "spec:simplecov" do
      require "launchy"
      Launchy.open("coverage/index.html")
    end
  end
end

desc "Alias to spec:simplecov"
task "spec" => "spec:simplecov"

task "clobber" => ["spec:clobber_simplecov"]