tomas-stefano/infinity_test — Issue #29: ApplicationFile.search() should be able to search for options specified as strings
Author: patkoscsaba
Created: 2011-12-21 12:08:26+00:00
State: open

Scenario:
- I have some folder in my project, with code, and I add a heuristics for it. (let call this folder C)
- I use rspect test framework
- I have another folder (outside the spec folder, let's call it X) and I want to run all tests in that folder when something changes in C

So I was trying to do this

add heuristics('C') do |file|
run 'X'
end

However, that wants to run /spec/X instead of what I would expect /X. I can work it around by passing a MatchData object to 'run' like this: run /(.*)/.match('X'), but that is very hackish.

I would like to propose a change, in application_file.search() method, on line 22. Instead of doing a case/when, you could just do an
if Hash

else
options.to_s
end

... or something similar, that would allow a user to put the folder directly as a string into the parameters of 'run'

Thanks