diff options
author | Pawan Dubey <git@pawandubey.com> | 2017-07-24 21:53:01 -0400 |
---|---|---|
committer | Kasper Timm Hansen <kaspth@gmail.com> | 2017-07-25 21:00:43 +0200 |
commit | 07d84b7c8db5b85f7521cfc5d2028ed973d9a14b (patch) | |
tree | 1a071303a91ef30d833fd6bf5b0f259472fd92a6 /activerecord/test/cases/reaper_test.rb | |
parent | 82200b2541c2e1adee2919aaaccf4bf268c9af99 (diff) | |
download | rails-07d84b7c8db5b85f7521cfc5d2028ed973d9a14b.tar.gz rails-07d84b7c8db5b85f7521cfc5d2028ed973d9a14b.tar.bz2 rails-07d84b7c8db5b85f7521cfc5d2028ed973d9a14b.zip |
Allow bin/rails test task to take absolute paths as arguments
Solves #29923
This regression was caused due to a wrong regex to filter out
paths, introduced in commit 796a1cf0e
The regex was /^\w+\// which did not accept paths with a leading
slash and hence all absolute paths were filtered out.
This change introduces a change in regex which allows for a leading
slash and acts on the matched term accordingly.
While cascading through the case block, the paths are checked for
line number specification, existence of a directory at that path
and if none of those match, then it is considered to be a path to the
file. The regex matchers specified are filtered out via the call
to `Array#compact` since they do not match any of these conditions.
Diffstat (limited to 'activerecord/test/cases/reaper_test.rb')
0 files changed, 0 insertions, 0 deletions