class Fixturama::FixtureError

The exception complaining about invalid definition in some fixture

Public Class Methods

new(object, data, _cause = nil) click to toggle source
Calls superclass method
   # File lib/fixturama/fixture_error.rb
25 def initialize(object, data, _cause = nil)
26   @object = object
27   @data = YAML.dump(data)
28 
29   super message
30 end

Public Instance Methods

message() click to toggle source

The error message @return [String]

   # File lib/fixturama/fixture_error.rb
 7   def message
 8     <<~MESSAGE
 9       Cannot infer #{@object} from the following part of the fixture #{@file}:
10       #{@data}
11     MESSAGE
12   end
with_file(file) click to toggle source

@private Add reference to the path of the fixture file @param [String] file @return [self]

   # File lib/fixturama/fixture_error.rb
18 def with_file(file)
19   @file = file
20   self
21 end