Skip to content

Commit 545d324

Browse files
author
James Couball
committed
Move RSpec config from Rakefile to .rspec
1 parent 0381578 commit 545d324

File tree

3 files changed

+17
-15
lines changed

3 files changed

+17
-15
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,5 @@
1414
rubocop-report.json
1515

1616
/Gemfile.lock
17+
.idea
18+
.irb_history

.rspec

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
--require spec_helper.rb
2+
--color
3+
--format documentation

Rakefile

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# frozen_string_literal: true
22

3-
task default: %i[spec bundle:audit rubocop yardstick verify_measurements yard build]
3+
task default: %i[spec bundle:audit rubocop yardstick:audit yardstick:coverage yard build]
44

55
# Bundler Audit
66

@@ -20,13 +20,7 @@ require 'bump/tasks'
2020

2121
require 'rspec/core/rake_task'
2222

23-
RSpec::Core::RakeTask.new do |t|
24-
t.rspec_opts = %w[
25-
--require spec_helper.rb
26-
--color
27-
--format documentation
28-
]
29-
end
23+
RSpec::Core::RakeTask.new
3024

3125
CLEAN << 'coverage'
3226
CLEAN << '.rspec_status'
@@ -55,14 +49,17 @@ end
5549
CLEAN << '.yardoc'
5650
CLEAN << 'doc'
5751

58-
# yardstick
52+
# Yardstick
5953

60-
require 'yardstick/rake/verify'
61-
Yardstick::Rake::Verify.new do |verify|
62-
verify.threshold = 100
54+
desc 'Run yardstick to show missing YARD doc elements'
55+
task :'yardstick:audit' do
56+
sh "yardstick 'lib/**/*.rb'"
6357
end
6458

65-
desc 'Run yardstick to check yard docs'
66-
task :yardstick do
67-
sh "yardstick 'lib/**/*.rb'"
59+
# Yardstick coverage
60+
61+
require 'yardstick/rake/verify'
62+
63+
Yardstick::Rake::Verify.new(:'yardstick:coverage') do |verify|
64+
verify.threshold = 100
6865
end

0 commit comments

Comments
 (0)