Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow matching any line number of example in filter #19

Closed
icy-arctic-fox opened this issue Jan 6, 2021 · 0 comments · Fixed by #23
Closed

Allow matching any line number of example in filter #19

icy-arctic-fox opened this issue Jan 6, 2021 · 0 comments · Fixed by #23
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@icy-arctic-fox
Copy link
Owner

The file and line filter should be able to match any line of the example block, not just the first. For instance:

it "does a thing" do # Line 1
  expect(true).to be_true # Line 2
end # Line 3

Running any of the following the match and run the example.

crystal spec spec/example_spec.cr:1
crystal spec spec/example_spec.cr:2
crystal spec spec/example_spec.cr:3

Implementing this involves adding a "end line" value to the Source type in addition to updating the example filter to match the line range.

Spawned from #18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant