Closed matthewmcgarvey closed 3 years ago
- You can only specify line numbers that fall within the specific "it" block. You cannot put a line number of the context block and expect all the specs within it to run. From what I've seen, only the it block sources get passed in so there'd have to be a way to hold a reference to it's parent so that it could check if the number falls within its range (and that parent would also have to hold a reference to its parent, etc)
The example's group can be retrieved by calling example.group
. The example group has its own source (example.group.source
). That could be checked along with parent groups. That might be outside the scope of this PR/issue. Up to you if you want to implement that.
I made a new issue to encompass the line numbers for groupings of specs https://github.com/icy-arctic-fox/spectator/issues/24.
With the one problem of specs with comments/newlines at the end of the block, I think this is ready.
Fixes #19
This allows calling
crystal spec file_path:line_number
with any number that falls within the specific spec's boundaries.Caveats