Exception: MissingFixtureError
- Inherits:
-
JoinFixError
- Object
- RuntimeError
- JoinFixError
- MissingFixtureError
- Defined in:
- lib/joinfix/error.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#table_name ⇒ Object
readonly
Returns the value of attribute table_name.
Attributes inherited from JoinFixError
Instance Method Summary collapse
- #advice ⇒ Object
-
#initialize(table_name) ⇒ MissingFixtureError
constructor
A new instance of MissingFixtureError.
- #message ⇒ Object
Methods inherited from JoinFixError
Constructor Details
#initialize(table_name) ⇒ MissingFixtureError
Returns a new instance of MissingFixtureError.
25 26 27 28 |
# File 'lib/joinfix/error.rb', line 25 def initialize(table_name) @fixtures = table_name @table_name = table_name end |
Instance Attribute Details
#table_name ⇒ Object (readonly)
Returns the value of attribute table_name.
24 25 26 |
# File 'lib/joinfix/error.rb', line 24 def table_name @table_name end |
Instance Method Details
#advice ⇒ Object
35 36 37 38 39 40 41 42 |
# File 'lib/joinfix/error.rb', line 35 def advice %Q{ Be sure you've specified all the tables for which your fixtures create entries. --- class UserTest < Test::Unit::TestCase fixtures :users, :groups, :user_groups # => got to name them all!!! end} end |
#message ⇒ Object
30 31 32 33 |
# File 'lib/joinfix/error.rb', line 30 def "No fixture loaded for <#{table_name}>\n" + (advice.nil? ? '' : "#{advice}\n") end |