ApplicationFile.search() should be able to search for options specified as strings
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 <project_folder>/spec/X instead of what I would expect <project_folder>/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 <do_what_you_do_for_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
Good Idea! I have planning some of this features in the 2.0 version. I will rewrite the entire library for the 2.0. It's almost ready. I'll push in a other branch some days/weeks from now, the rewrite stuff.
Cheers!
Thanks for the prompt answer and for the positive reactions to my idea. I'm not the best ruby developer out there, but if you need some help, I am available 1-2 hours a day to contribute to infinity_test.
On Thu, Dec 22, 2011 at 6:09 AM, Tomas D'Stefano < [email protected]
wrote:
Good Idea! I have planning some of this features in the 2.0 version. I will rewrite the entire library for the 2.0. It's almost ready. I'll push in a other branch the rewrite stuff.
Cheers!
Reply to this email directly or view it on GitHub:
https://github.com/tomas-stefano/infinity_test/issues/29#issuecomment-3244073
Nice! I created the rewrite branch. You can see here: https://github.com/tomas-stefano/infinity_test/tree/rewrite If you have any doubts about the rewrite, let me know here. I think I'll be working on this rewrite in the next week.
Cheers