update :spec rake task to allow example pattern as an argument

This commit is contained in:
Josh Holtrop 2015-01-29 09:48:00 -05:00
parent 859f87ddee
commit 9c49a09f69

View File

@ -13,7 +13,11 @@ require "rake/clean"
CLEAN.include %w[build_test_run .yardoc doc coverage]
CLOBBER.include %w[pkg]
RSpec::Core::RakeTask.new(:spec)
RSpec::Core::RakeTask.new(:spec, :example_string) do |task, args|
if args.example_string
task.rspec_opts = %W[-e "#{args.example_string}" -f documentation]
end
end
YARD::Rake::YardocTask.new do |yard|
yard.files = ['lib/**/*.rb']