thoughtbot / vim-rspec

Run Rspec specs from Vim
https://robots.thoughtbot.com
MIT License
656 stars 108 forks source link

Line number and shared examples #107

Open delphaber opened 8 years ago

delphaber commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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

dgmstuart commented 8 years ago

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

rspec spec/my_spec.rb:17