burke/zeus — pull request #194 by turadg (2012-12-08 22:52:36+00:00)
Title: Better `spec_file?` logic

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.