Fix plugin:spec rake task to include subdirectories.

This commit is contained in:
Vikhyat Korrapati 2014-02-05 06:11:49 +05:30
parent 759c18d9f5
commit fab4e59f76

View file

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