mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-04-24 04:46:05 +08:00
Make _spec suffix optional when running rake spec files=...
With this change, the following invocations are equivalent:
rake spec files=integration_spec
and
rake spec files=integration
This commit is contained in:
@@ -379,7 +379,7 @@ EOS
|
||||
# Filter specs we want to run. A filter can be either the basename of a spec file or its path.
|
||||
files_filter = files_filter.split(',')
|
||||
files_filter.map! { |x| File.exist?(x) ? File.expand_path(x) : x }
|
||||
specs.delete_if { |x| !files_filter.include?(File.expand_path(x)) and !files_filter.include?(File.basename(x, '.rb')) }
|
||||
specs.delete_if { |x| [File.expand_path(x), File.basename(x, '.rb'), File.basename(x, '_spec.rb')].none? { |p| files_filter.include?(p) } }
|
||||
end
|
||||
core + helpers + specs
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user