Class: SpecForge::Error::InvalidBuildStrategy

Inherits:
Error
  • Object
show all
Defined in:
lib/spec_forge/error.rb

Overview

Raised when an unknown factory build strategy is provided Indicates when a strategy string doesn't match supported options

Instance Method Summary collapse

Constructor Details

#initialize(build_strategy) ⇒ InvalidBuildStrategy

Returns a new instance of InvalidBuildStrategy.



229
230
231
232
233
234
235
236
237
238
# File 'lib/spec_forge/error.rb', line 229

def initialize(build_strategy)
  valid_strategies = Attribute::Factory::BUILD_STRATEGIES.to_or_sentence

  super(<<~STRING.chomp
    Unknown build strategy "#{build_strategy}" referenced in spec.

    Valid strategies include: #{valid_strategies}
  STRING
  )
end