Open mattwynne opened 9 years ago
see my comment in #25. In ::cucumber::_add_step
:
# an attempt at saving the source of the step definition
# 3 in [info frame..] is a magic number that only works in this constellation of [source]s
# haven't come up with a more robust way yet
set location "[file tail [uplevel 3 {info script}]]:[dict get [info frame 3] line]"
lappend STEPS [list $re $params $body $location]
this works now in cucumber-tcl-wire and could be probably directly transfered into this repo. The magic numbers are now somewhat less magic and are robust against framelevel differences when sourcing the steps.
BTW, what is the workflow for developing this lib? rake
→ code → rake
?
Thanks @d-led! Yes, rake
will run all the tests for both the Ruby and tcl parts of the codebase.
When Cucumber prints the scenario, it ideally needs a location for each step so it can print them to the user.
Example (imagined):