Exception: Fixturama::FixtureError

Inherits:
ArgumentError
  • Object
show all
Defined in:
lib/fixturama/fixture_error.rb

Overview

The exception complaining about invalid definition in some fixture

Instance Method Summary collapse

Instance Method Details

#messageString

The error message



7
8
9
10
11
12
# File 'lib/fixturama/fixture_error.rb', line 7

def message
  <<~MESSAGE
    Cannot infer #{@object} from the following part of the fixture #{@file}:
    #{@data}
  MESSAGE
end

#with_file(file) ⇒ self

Add reference to the path of the fixture file



18
19
20
21
# File 'lib/fixturama/fixture_error.rb', line 18

def with_file(file)
  @file = file
  self
end