Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #7193 (new enhancement)

Opened 2 years ago

[PATCH] Warn about possible missing call to fixtures in TestCase

Reported by: eventualbuddha Assigned to: core
Priority: low Milestone: 2.x
Component: ActiveRecord Version: edge
Severity: minor Keywords: warning test case fixtures tiny
Cc:

Description

I find that the main cause of a NoMethodError in a TestCase in Rails is that I forgot to include the table in the call to fixtures at the top of the class. Sometimes I spend more time than I should rediscovering this, and it'd be nice if I was warned about it right off the bat. This patch adds a helpful hint to the existing error message for NoMethodErrors raised in a TestCase.

Attachments

add-missing-fixture-warning-to-method-missing.diff (1.2 kB) - added by eventualbuddha on 01/19/07 07:44:41.

Change History

01/19/07 07:44:41 changed by eventualbuddha

  • attachment add-missing-fixture-warning-to-method-missing.diff added.