Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

[PATCH] Generators create tests with require 'test_helper' which doesn't work.

#168

The generators all create tests that use

require 'test_helper'

Howegver, when you run the tests in TextMate or at the command-line via ruby test/units/foo_test.rb, the tests cannot load the file. This patch restores the original line which loads the test_helpers correctly.

require File.dirname(__FILE__) + '/../test_helper'

This addresses

.../controller/templates/functional_test.rb

.../integration_test/templates/integration_test.rb

.../components/mailer/templates/unit_test.rb

.../components/model/templates/unit_test.rb

.../components/observer/templates/unit_test.rb

.../resource/templates/functional_test.rb

.../scaffold/templates/functional_test.rb

Hopefully I got them all.

Reported by Brian Hogan · May 12th, 2008 @ 04:31 AM

State: invalid
Milestone: none
Assigned to: nobody
Importance: Low

Activity

  1. Jeremy Kemper
    Jeremy Kemper
    • State changed from new to invalid

    Include the test dir in the load path: ruby -Itest test/units/foo_test.rb

    Or invoke the test via the test task: rake TEST=test/units/foo_test.rb

    May 12th, 2008 @ 07:08 AM

  2. Ryan Bigg
    Ryan Bigg
    • Tag cleared.
    • Importance changed from to Low

    Automatic cleanup of spam.

    October 11th, 2010 @ 10:55 AM