aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2008-03-29 18:41:10 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2008-03-29 18:41:10 +0000
commite8170805df1a32119db9d328daee1239b338ac71 (patch)
tree6776509fd30e3e955a31908577730109bbeaf8d6 /railties/lib
parent827b529459c652f21a0122090393209446567b37 (diff)
downloadrails-e8170805df1a32119db9d328daee1239b338ac71.tar.gz
rails-e8170805df1a32119db9d328daee1239b338ac71.tar.bz2
rails-e8170805df1a32119db9d328daee1239b338ac71.zip
Generated tests rely on test dir in load path rather than File.dirname shenanigans. ruby -Itest test/unit/foo_test.rb to run a test by hand (that's a capital I as in Island).
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9133 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/lib')
-rw-r--r--railties/lib/rails_generator/generators/components/controller/templates/functional_test.rb2
-rw-r--r--railties/lib/rails_generator/generators/components/integration_test/templates/integration_test.rb2
-rw-r--r--railties/lib/rails_generator/generators/components/mailer/templates/unit_test.rb2
-rw-r--r--railties/lib/rails_generator/generators/components/model/templates/unit_test.rb2
-rw-r--r--railties/lib/rails_generator/generators/components/observer/templates/unit_test.rb2
-rw-r--r--railties/lib/rails_generator/generators/components/resource/templates/functional_test.rb2
-rw-r--r--railties/lib/rails_generator/generators/components/scaffold/templates/functional_test.rb2
7 files changed, 7 insertions, 7 deletions
diff --git a/railties/lib/rails_generator/generators/components/controller/templates/functional_test.rb b/railties/lib/rails_generator/generators/components/controller/templates/functional_test.rb
index 935beafa67..38e0ae7123 100644
--- a/railties/lib/rails_generator/generators/components/controller/templates/functional_test.rb
+++ b/railties/lib/rails_generator/generators/components/controller/templates/functional_test.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '<%= '/..' * class_nesting_depth %>/../test_helper'
+require 'test_helper'
class <%= class_name %>ControllerTest < ActionController::TestCase
# Replace this with your real tests.
diff --git a/railties/lib/rails_generator/generators/components/integration_test/templates/integration_test.rb b/railties/lib/rails_generator/generators/components/integration_test/templates/integration_test.rb
index 61688aee4e..149b987d81 100644
--- a/railties/lib/rails_generator/generators/components/integration_test/templates/integration_test.rb
+++ b/railties/lib/rails_generator/generators/components/integration_test/templates/integration_test.rb
@@ -1,4 +1,4 @@
-require "#{File.dirname(__FILE__)}<%= '/..' * class_nesting_depth %>/../test_helper"
+require 'test_helper'
class <%= class_name %>Test < ActionController::IntegrationTest
# fixtures :your, :models
diff --git a/railties/lib/rails_generator/generators/components/mailer/templates/unit_test.rb b/railties/lib/rails_generator/generators/components/mailer/templates/unit_test.rb
index dcd0206211..0b4b2ec60a 100644
--- a/railties/lib/rails_generator/generators/components/mailer/templates/unit_test.rb
+++ b/railties/lib/rails_generator/generators/components/mailer/templates/unit_test.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '<%= '/..' * class_nesting_depth %>/../test_helper'
+require 'test_helper'
class <%= class_name %>Test < ActionMailer::TestCase
tests <%= class_name %>
diff --git a/railties/lib/rails_generator/generators/components/model/templates/unit_test.rb b/railties/lib/rails_generator/generators/components/model/templates/unit_test.rb
index 9bb3ca4160..96bd34adab 100644
--- a/railties/lib/rails_generator/generators/components/model/templates/unit_test.rb
+++ b/railties/lib/rails_generator/generators/components/model/templates/unit_test.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '<%= '/..' * class_nesting_depth %>/../test_helper'
+require 'test_helper'
class <%= class_name %>Test < ActiveSupport::TestCase
# Replace this with your real tests.
diff --git a/railties/lib/rails_generator/generators/components/observer/templates/unit_test.rb b/railties/lib/rails_generator/generators/components/observer/templates/unit_test.rb
index b432f04fce..1faf8ed9ac 100644
--- a/railties/lib/rails_generator/generators/components/observer/templates/unit_test.rb
+++ b/railties/lib/rails_generator/generators/components/observer/templates/unit_test.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '<%= '/..' * class_nesting_depth %>/../test_helper'
+require 'test_helper'
class <%= class_name %>ObserverTest < Test::Unit::TestCase
# Replace this with your real tests.
diff --git a/railties/lib/rails_generator/generators/components/resource/templates/functional_test.rb b/railties/lib/rails_generator/generators/components/resource/templates/functional_test.rb
index 19363a82d5..fbb69fcca7 100644
--- a/railties/lib/rails_generator/generators/components/resource/templates/functional_test.rb
+++ b/railties/lib/rails_generator/generators/components/resource/templates/functional_test.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '<%= '/..' * class_nesting_depth %>/../test_helper'
+require 'test_helper'
class <%= controller_class_name %>ControllerTest < ActionController::TestCase
# Replace this with your real tests.
diff --git a/railties/lib/rails_generator/generators/components/scaffold/templates/functional_test.rb b/railties/lib/rails_generator/generators/components/scaffold/templates/functional_test.rb
index 2b1f6520d9..3b430a2061 100644
--- a/railties/lib/rails_generator/generators/components/scaffold/templates/functional_test.rb
+++ b/railties/lib/rails_generator/generators/components/scaffold/templates/functional_test.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '<%= '/..' * class_nesting_depth %>/../test_helper'
+require 'test_helper'
class <%= controller_class_name %>ControllerTest < ActionController::TestCase
def test_should_get_index