redding / assert

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

accumulate: abstract suite `tests_to_run` #268

Closed kellyredding closed 8 years ago

kellyredding commented 8 years ago

This builds off the original abstract effort from PR 266. I realized I had moved to not use the tests reader, but in doing so had just replaced this reader with a new tests_to_run reader. This kinda missed the original point.

This switches to letting the suite define how to lookup a single test by file line and sorting the tests given a sort_by proc. I chose to pass in the sort by proc so the runner continues to force that the tests are sorted randomly and to continue jux'ing the srand and rand logic in the runner.

In particular, the sort method taking a sort_by proc implies that a sort_by call will be made which implies that at some point the tests will be in an enumerable in memory. This makes me wonder if my choice to move storing test in memory only in the default suite was a bit premature. It may work out that, much like the runner, the base suite forces storing tests in memory while the default suite has little to no logic in it. I'll address this after I rework the view logic to accumulate data and see how the logic shakes out, FYI.

@jcredding ready for review.

jcredding commented 8 years ago

@kellyredding - Looks good :boom: