For rake plugin:spec, only load ruby files ending in _spec.rb

This matches the default behaviour of rspec
This commit is contained in:
David Taylor 2017-07-10 12:06:37 +01:00
parent 3b1b00a869
commit 0b222493f6
1 changed files with 1 additions and 1 deletions

View File

@ -47,7 +47,7 @@ desc 'run plugin specs'
task 'plugin:spec', :plugin do |t, args|
args.with_defaults(plugin: "*")
ruby = `which ruby`.strip
files = Dir.glob("./plugins/#{args[:plugin]}/spec/**/*.rb")
files = Dir.glob("./plugins/#{args[:plugin]}/spec/**/*_spec.rb")
if files.length > 0
sh "LOAD_PLUGINS=1 #{ruby} -S rspec #{files.join(' ')}"
else