aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2008-06-25 15:24:12 -0500
committerJoshua Peek <josh@joshpeek.com>2008-06-25 15:24:12 -0500
commit339491a6b37722497ebafe9998e17507f47e8fd6 (patch)
tree96e7dc63607054c6e3ce6f08e41a9e96d8a44ea5 /actionpack/test/template
parenta9259ccfe05690dc4cb7993d551603c39619c27f (diff)
downloadrails-339491a6b37722497ebafe9998e17507f47e8fd6.tar.gz
rails-339491a6b37722497ebafe9998e17507f47e8fd6.tar.bz2
rails-339491a6b37722497ebafe9998e17507f47e8fd6.zip
Set precompiled fixture load path constant to speed up tests
Diffstat (limited to 'actionpack/test/template')
-rw-r--r--actionpack/test/template/render_test.rb4
-rw-r--r--actionpack/test/template/url_helper_test.rb8
2 files changed, 5 insertions, 7 deletions
diff --git a/actionpack/test/template/render_test.rb b/actionpack/test/template/render_test.rb
index bdabe07121..54e4bbda1b 100644
--- a/actionpack/test/template/render_test.rb
+++ b/actionpack/test/template/render_test.rb
@@ -2,11 +2,9 @@ require 'abstract_unit'
require 'controller/fake_models'
class ViewRenderTest < Test::Unit::TestCase
- FIXTURE_LOAD_PATHS = ActionView::ViewLoadPaths.new([File.join(File.dirname(__FILE__), '..', 'fixtures')])
-
def setup
@assigns = { :secret => 'in the sauce' }
- @view = ActionView::Base.new(FIXTURE_LOAD_PATHS, @assigns)
+ @view = ActionView::Base.new([FIXTURE_LOAD_PATH], @assigns)
end
def test_render_file
diff --git a/actionpack/test/template/url_helper_test.rb b/actionpack/test/template/url_helper_test.rb
index 44ceed6661..3d5f7eae11 100644
--- a/actionpack/test/template/url_helper_test.rb
+++ b/actionpack/test/template/url_helper_test.rb
@@ -301,7 +301,7 @@ end
class UrlHelperWithControllerTest < ActionView::TestCase
class UrlHelperController < ActionController::Base
- self.view_paths = [ "#{File.dirname(__FILE__)}/../fixtures/" ]
+ self.view_paths = [FIXTURE_LOAD_PATH]
def self.controller_path; 'url_helper_with_controller' end
@@ -356,7 +356,7 @@ end
class LinkToUnlessCurrentWithControllerTest < ActionView::TestCase
class TasksController < ActionController::Base
- self.view_paths = ["#{File.dirname(__FILE__)}/../fixtures/"]
+ self.view_paths = [FIXTURE_LOAD_PATH]
def self.controller_path; 'tasks' end
@@ -448,7 +448,7 @@ end
class PolymorphicControllerTest < ActionView::TestCase
class WorkshopsController < ActionController::Base
- self.view_paths = ["#{File.dirname(__FILE__)}/../fixtures/"]
+ self.view_paths = [FIXTURE_LOAD_PATH]
def self.controller_path; 'workshops' end
@@ -466,7 +466,7 @@ class PolymorphicControllerTest < ActionView::TestCase
end
class SessionsController < ActionController::Base
- self.view_paths = ["#{File.dirname(__FILE__)}/../fixtures/"]
+ self.view_paths = [FIXTURE_LOAD_PATH]
def self.controller_path; 'sessions' end