Method: Cyperful::Driver#setup_tracing
- Defined in:
- lib/cyperful/driver.rb
#setup_tracing ⇒ Object
subscribe to the execution of each line of code in the test. this let’s us notify the frontend of the line’s status, and pause execution if needed.
165 166 167 168 169 170 171 172 173 174 175 176 177 178 |
# File 'lib/cyperful/driver.rb', line 165 def setup_tracing @tracepoint&.disable @tracepoint = TracePoint.new(:line) do |tp| next if @source_filepath.nil? || tp.path != @source_filepath finish_current_step step = @step_per_line[tp.lineno] pause_on_step(step) if step end @tracepoint.enable end |