simple_bdd icon indicating copy to clipboard operation
simple_bdd copied to clipboard

Show line numbers for pending step

Open j-clark opened this issue 11 years ago • 3 comments

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.

j-clark avatar Dec 02 '13 21:12 j-clark

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?

robb1e avatar Dec 04 '13 13:12 robb1e

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

j-clark avatar Dec 04 '13 20:12 j-clark

Have a crack at the pull request, would be happy to accept if you can get working.

robb1e avatar Dec 04 '13 21:12 robb1e