Class: FactoryGirl::Linter::FactoryError

Inherits:
Object
  • Object
show all
Defined in:
lib/factory_girl/linter.rb

Direct Known Subclasses

FactoryTraitError

Instance Method Summary collapse

Constructor Details

#initialize(wrapped_error, factory) ⇒ FactoryError

Returns a new instance of FactoryError.



30
31
32
33
# File 'lib/factory_girl/linter.rb', line 30

def initialize(wrapped_error, factory)
  @wrapped_error = wrapped_error
  @factory       = factory
end

Instance Method Details

#locationObject



40
41
42
# File 'lib/factory_girl/linter.rb', line 40

def location
  @factory.name
end

#messageObject



35
36
37
38
# File 'lib/factory_girl/linter.rb', line 35

def message
  message = @wrapped_error.message
  "* #{location} - #{message} (#{@wrapped_error.class.name})"
end