From 03035a25a58762f44f29db8942f7adf716b86e31 Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Sat, 12 Jun 2021 22:46:13 -0400 Subject: [PATCH] Update spec task to accept an example pattern --- Rakefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index b7e9ed5..3882576 100644 --- a/Rakefile +++ b/Rakefile @@ -1,6 +1,10 @@ require "bundler/gem_tasks" require "rspec/core/rake_task" -RSpec::Core::RakeTask.new(:spec) +RSpec::Core::RakeTask.new(:spec, :example_pattern) do |task, args| + if args.example_pattern + task.rspec_opts = %W[-e "#{args.example_pattern}" -f documentation] + end +end task :default => :spec