I'd like to get the metadata for the examples in my suite before running it. I want to parallelize my test suite based off of tags. Anyone know how to get this data during something like RSpec.configure
?
RSpec: How to get example metadata before running suite
428 Views Asked by Dane O'Connor At
2
I don't see a way to do this while running the suite. You could conceivably create a custom formatter and run the suite with
rspec --dry-run --format=MyFormatter
, capture the output, extract the metadata and then do what you want with it. Unfortunately it appears the built-in JSON formatter does not output example metadata.More info on formatters in the RSpec docs.