Skip to content

Commit cdc4b26

Browse files
authored
Merge pull request #229 from eduardoj/refactoring/rake_spec_parameters
Set file pattern only if it is passed from the from command line
2 parents 281ee2b + 47abe41 commit cdc4b26

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)