Class: SpecForge::Error::InvalidStepError
- Inherits:
-
Error
- Object
- Error
- SpecForge::Error::InvalidStepError
- Defined in:
- lib/spec_forge/error.rb
Overview
Raised when a step has an invalid configuration
Common cases:
- Action attributes (request, expect, call, debug, store) combined with steps
- Expects defined without a corresponding request
Instance Method Summary collapse
-
#initialize(message, step = nil) ⇒ InvalidStepError
constructor
A new instance of InvalidStepError.
Constructor Details
#initialize(message, step = nil) ⇒ InvalidStepError
Returns a new instance of InvalidStepError.
249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 |
# File 'lib/spec_forge/error.rb', line 249 def initialize(, step = nil) if step step_name = step[:name].presence || "(unnamed)" line_info = if (source = step[:source]) "#{source[:file_name]}:#{source[:line_number]}" else "unknown location" end = "Step #{step_name.in_quotes} [#{line_info}]: #{}" end super() end |