redding / assert

Assertion style testing framework.
https://github.com/redding/assert
MIT License
10 stars 1 forks source link

add option for running only matching test files with changes #135

Closed kellyredding closed 11 years ago

kellyredding commented 11 years ago

This is a new CLI option (-c) that tells assert to only load test files in the given path(s) that have changes. Use this to "scope down" your test runs to just the tests you are actively working on.

This uses git (by default) to determine which files have changes. Custom cmds can be configured in the user/local settings if git is not available or a more specific set of cmds is needed.

Closes #134.

@jcredding this totally works and is totally awesome (I used it while testing it!). Ready for review. I need your thoughts especially on option naming, setting custom cmds and that whole workflow, and just "how does this feel". Thanks man.

jcredding commented 11 years ago

@kellyredding - That's pretty awesome, didn't take all that much to make it work. The changed_only option is fine with me. I see why you did changed_cmds, I'm not really sure how it would work for SVN or something else, but it should be about the same, though there might be more processing needed (like if the SVN commands don't give you just the names of the files and you need to parse the output for them). The only other way I could think to do it would be some kind of Proc, but that could require more work if my commands were simple like gits. Anyway, just some thoughts. I think this is good to go though. :boom:

kellyredding commented 11 years ago

@jcredding no, your comment makes a lot of sense. I've updated the implementation to just configure a generic proc to provide the changed test files. This way you are free to do whatever you want/need. The default "two git command" implementation is updated to this Proc form and the README docs have been updated as well. Take another look for me please and give me your thoughts. Thanks man.

jcredding commented 11 years ago

@kellyredding - Looks great to me :boom: