This project is archived and is in readonly mode.

#168 ✓invalid
Brian Hogan

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

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

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.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Attachments

Pages