Exception: Shaf::Spec::Fixtures::FixtureNotFound

Inherits:
StandardError
  • Object
show all
Defined in:
lib/shaf/spec/fixtures.rb

Instance Method Summary collapse

Constructor Details

#initialize(name, key = nil) ⇒ FixtureNotFound

Returns a new instance of FixtureNotFound.



5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/shaf/spec/fixtures.rb', line 5

def initialize(name, key = nil)
  msg =
    if key
      "Instance '#{key}' is not found in fixture '#{name}'! " \
        "Either it does not exist in the fixture definition or " \
        "there is a circular dependency with your fixtures."
    else
      "No such fixture: #{name}"
    end

  super(msg)
end