Module: Turnip::RSpec::Execute
- Includes:
- Execute
- Defined in:
- lib/turnip/rspec.rb
Overview
This module provides an improved method to run steps inside RSpec, adding proper support for pending steps, as well as nicer backtraces.
Instance Method Summary collapse
Methods included from Execute
Instance Method Details
#run_step(feature_file, step) ⇒ Object
42 43 44 45 46 47 48 49 50 51 |
# File 'lib/turnip/rspec.rb', line 42 def run_step(feature_file, step) begin step(step) rescue Turnip::Pending pending("No such step: '#{step}'") rescue StandardError => e e.backtrace.push "#{feature_file}:#{step.line}:in `#{step.description}'" raise e end end |