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

Returns:

  • (String)


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

def message
  "    Cannot infer \#{@object} from the following part of the fixture \#{@file}:\n    \#{@data}\n  MESSAGE\nend\n"

#with_file(file) ⇒ self

Add reference to the path of the fixture file

Parameters:

  • file (String)

Returns:

  • (self)


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

def with_file(file)
  @file = file
  self
end