Update spec task to accept an example pattern

This commit is contained in:
Josh Holtrop 2021-06-12 22:46:13 -04:00
parent db70f8b94d
commit 03035a25a5

View File

@ -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