mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 06:04:11 +08:00
Merge pull request #4964 from davidtaylorhq/plugin_spec_filter
For rake plugin:spec, only load ruby files ending in _spec.rb
This commit is contained in:
commit
3d32460e1c
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user