Please sign in to comment.
Better spec_file? logic (fixes #187)
The current logic has two problems. 1. Doesn't detect "spec" argument as triggering Rspec runner, erroneously uses M instead. 2. When an earlier argument is a Ruby file that isn't a spec (such as `formatter.rb`) the spec detection gives false negative because it doesn't match the spec pattern. This fix looks at the last argument instead (where options won't be) and matches on /^spec/. I think that's the only regexp necessary, but I left SPEC_FILE_REGEXP that was already there.
- Loading branch information...