Skip to content

Line number and shared examples #107

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

Open
delphaber opened this issue Jan 14, 2016 · 3 comments
Open

Line number and shared examples #107

delphaber opened this issue Jan 14, 2016 · 3 comments

Comments

@delphaber
Copy link

When I run the current test in a spec file with shared_examples, then rspec does not run my test, but another.

I think because shared_examples are "injected" into the spec file, fooling the line number mechanism.

Is it just me?

@dgmstuart
Copy link
Contributor

Do you mean RunCurrentSpecFile (the whole of the file you're currently in) or RunNearestSpec (the single example or group which your cursor is in)?

@delphaber
Copy link
Author

Sorry... I was talking about RunNearestSpec. Thanks!

@dgmstuart
Copy link
Contributor

What happens when you run RSpec with that line number e.g:

rspec spec/my_spec.rb:17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants