simple_bdd
simple_bdd copied to clipboard
Show line numbers for pending step
When a step is defined, but not implemented, the message should show the line number of the step. Currently only the line number of the scenario is shown.
The printing of the scenario number is from RSpec I assume. When you mean not implemented, do you mean the method doesn't exist so you're getting the pending
message? Is it the line number of the Given/When/Then call you'd like printed?
Yeah, exactly. Here's an example:
± ak+jc |staging ✗| → rspec spec/features/my_spec.rb:50
Run options: include {:locations=>{"./spec/features/my_spec.rb"=>[50]}}
1/1 |================================================= 100 =================================================>| Time: 00:00:00
Pending:
Someone does something
# i_facilitate_doing_something
# ./spec/features/my_spec.rb:50
Finished in 0.39671 seconds
1 example, 0 failures, 1 pending
It would be cool if the message was something along the lines of
Pending:
Someone does something
# ./spec/features/my_spec.rb:51 in `i_facilitate_doing_something'
# ./spec/features/my_spec.rb:50
Sort of like a normal stack trace. Or something along those lines.
Thoughts? Not sure how hard this would be to implement. I might try to submit a pull request if you like the idea
Have a crack at the pull request, would be happy to accept if you can get working.