From 47abe41c808b8113ec1c914761ec2c6579a97913 Mon Sep 17 00:00:00 2001 From: Eduardo Navarro Date: Tue, 28 May 2024 10:00:09 +0200 Subject: [PATCH] Set file pattern only if it is passed from the ... ... from command line --- Rakefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Rakefile b/Rakefile index f0acaa0..652470a 100644 --- a/Rakefile +++ b/Rakefile @@ -3,13 +3,12 @@ require "rubocop/rake_task" RuboCop::RakeTask.new targeted_files = ARGV.drop(1) -file_pattern = targeted_files.empty? ? "spec/**/*_spec.rb" : targeted_files require "rspec/core" require "rspec/core/rake_task" RSpec::Core::RakeTask.new(:spec) do |t| - t.pattern = FileList[file_pattern] + t.pattern = targeted_files unless targeted_files.empty? end RSpec.configure do |config|