perl-Test-Spec
perl-Test-Spec copied to clipboard
fdescribe/fit functionality ?
Hi! Thanks for Test::Spec, I quite enjoy using it. Is there existing functionality available like Jasmine's focused specs? I find myself wanting to only run one describe
spec or one it
spec, but the only thing I've found in Test::Spec is xdescribe
/xit
, which means I'd have to add x
to every other spec instead of adding f
to the single spec I'm focused on.
If the functionality isn't available, would you be amenable to a PR for it?
edit: ah right, I forgot about providing an argument to runtests
and/or setting $ENV{SPEC}. Hm, that should help...
Thanks for the feedback and the link, haven't seen that before. Personally I think runtests($test_name_to_run)
is a more general version that covers this use case. What do you think?
RSpec has the focus
option: https://relishapp.com/rspec/rspec-core/v/2-6/docs/filtering/inclusion-filters
The downside of runtests($test_name_to_run)
and that we need to convert the test name to underscore and add to that list.
The focus
option was used by me in RSpec and for people that I know that use RSpec today.