Skip to content

Commit 47abe41

Browse files
committed
Set file pattern only if it is passed from the ...
... from command line
1 parent 281ee2b commit 47abe41

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Rakefile

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,12 @@ require "rubocop/rake_task"
33
RuboCop::RakeTask.new
44

55
targeted_files = ARGV.drop(1)
6-
file_pattern = targeted_files.empty? ? "spec/**/*_spec.rb" : targeted_files
76

87
require "rspec/core"
98
require "rspec/core/rake_task"
109

1110
RSpec::Core::RakeTask.new(:spec) do |t|
12-
t.pattern = FileList[file_pattern]
11+
t.pattern = targeted_files unless targeted_files.empty?
1312
end
1413

1514
RSpec.configure do |config|

0 commit comments

Comments
 (0)