waterlink / spec2.cr

Enhanced `spec` testing library for [Crystal](http://crystal-lang.org/).
MIT License
103 stars 22 forks source link

Run single spec #30

Open vjdhama opened 8 years ago

vjdhama commented 8 years ago

Currently is it possible to just run a single spec? I tried doing crystal spec spec/application_spec.cr:24 but it ran all the specs.

waterlink commented 8 years ago

Hi,

This feature is currently on the roadmap. If you would like, you could contribute it. I'm here always for you to guide through the codebase in that case.

Am 05.03.2016 um 10:59 AM schrieb Vijay Dhama notifications@github.com:

Currently is it possible to just run a single spec? I tried doing crystal spec spec/application_spec.cr:24 but it ran all the specs.

— Reply to this email directly or view it on GitHub.

vjdhama commented 8 years ago

I haven't explored spec2 code much. I could contribute but I don't even know where to start. 😞

waterlink commented 7 years ago

@vjdhama If you are still interested, you can start looking from ./src/runners/default.cr. Currently it knows how to run context's examples and sub-contexts. Each example has a description. We could easily add there a filter for example description, a.k.a. DescriptionContainFilter. Then in the same fashion as runner accepts order parameter to order examples, it could accept a filter parameter to filter examples and contexts.

drujensen commented 7 years ago

@vjdhama @waterlink Any progress on this feature? If not, I may take some time to try and add the filter capability.