diff options
author | Łukasz Strzałkowski <lukasz.strzalkowski@gmail.com> | 2013-08-13 22:28:51 +0200 |
---|---|---|
committer | Łukasz Strzałkowski <lukasz.strzalkowski@gmail.com> | 2013-08-25 11:40:10 +0200 |
commit | 7620ab08be5cbc3621169d1b0e0bcd628732905b (patch) | |
tree | 65c9b1037a824c17def010323c2c4c06148f9322 /actionview | |
parent | 34a2e486d6ae9c72ea139d47cf32e023a17c0903 (diff) | |
download | rails-7620ab08be5cbc3621169d1b0e0bcd628732905b.tar.gz rails-7620ab08be5cbc3621169d1b0e0bcd628732905b.tar.bz2 rails-7620ab08be5cbc3621169d1b0e0bcd628732905b.zip |
Move actionpack's controller tests
Diffstat (limited to 'actionview')
-rw-r--r-- | actionview/Rakefile | 2 | ||||
-rw-r--r-- | actionview/test/actionpack/controller/capture_test.rb (renamed from actionview/test/actionpack/capture_test.rb) | 2 | ||||
-rw-r--r-- | actionview/test/actionpack/controller/layout_test.rb (renamed from actionview/test/actionpack/layout_test.rb) | 6 | ||||
-rw-r--r-- | actionview/test/actionpack/controller/render_test.rb (renamed from actionview/test/actionpack/render_test.rb) | 14 |
4 files changed, 12 insertions, 12 deletions
diff --git a/actionview/Rakefile b/actionview/Rakefile index 1c2fd2a867..e1cb4b5be0 100644 --- a/actionview/Rakefile +++ b/actionview/Rakefile @@ -35,7 +35,7 @@ namespace :test do desc 'ActionPack Integration Tests' Rake::TestTask.new(:action_pack) do |t| t.libs << 'test' - t.test_files = Dir.glob("test/actionpack/*_test.rb") + t.test_files = Dir.glob("test/actionpack/**/*_test.rb") t.warning = true t.verbose = true end diff --git a/actionview/test/actionpack/capture_test.rb b/actionview/test/actionpack/controller/capture_test.rb index c03cccf187..f8387b27b0 100644 --- a/actionview/test/actionpack/capture_test.rb +++ b/actionview/test/actionpack/controller/capture_test.rb @@ -2,7 +2,7 @@ require 'abstract_unit' require 'active_support/logger' class CaptureController < ActionController::Base - self.view_paths = [ File.dirname(__FILE__) + '/../fixtures/actionpack/' ] + self.view_paths = [ File.dirname(__FILE__) + '/../../fixtures/actionpack' ] def self.controller_name; "test"; end def self.controller_path; "test"; end diff --git a/actionview/test/actionpack/layout_test.rb b/actionview/test/actionpack/controller/layout_test.rb index e8b7c56019..5dd23c4b31 100644 --- a/actionview/test/actionpack/layout_test.rb +++ b/actionview/test/actionpack/controller/layout_test.rb @@ -9,7 +9,7 @@ old_load_paths = ActionController::Base.view_paths ActionView::Template::register_template_handler :mab, lambda { |template| template.source.inspect } -ActionController::Base.view_paths = [ File.dirname(__FILE__) + '/../fixtures/actionpack/layout_tests/' ] +ActionController::Base.view_paths = [ File.dirname(__FILE__) + '/../../fixtures/actionpack/layout_tests/' ] class LayoutTest < ActionController::Base def self.controller_path; 'views' end @@ -87,7 +87,7 @@ class StreamingLayoutController < LayoutTest end class AbsolutePathLayoutController < LayoutTest - layout File.expand_path(File.expand_path(__FILE__) + '/../../fixtures/actionpack/layout_tests/layouts/layout_test') + layout File.expand_path(File.expand_path(__FILE__) + '/../../../fixtures/actionpack/layout_tests/layouts/layout_test') end class HasOwnLayoutController < LayoutTest @@ -108,7 +108,7 @@ end class PrependsViewPathController < LayoutTest def hello - prepend_view_path File.dirname(__FILE__) + '/../fixtures/actionpack/layout_tests/alt/' + prepend_view_path File.dirname(__FILE__) + '/../../fixtures/actionpack/layout_tests/alt/' render :layout => 'alt' end end diff --git a/actionview/test/actionpack/render_test.rb b/actionview/test/actionpack/controller/render_test.rb index dde47624f0..964dccbffb 100644 --- a/actionview/test/actionpack/render_test.rb +++ b/actionview/test/actionpack/controller/render_test.rb @@ -88,7 +88,7 @@ class TestController < ApplicationController end def hello_world_file - render :file => File.expand_path("../../fixtures/actionpack/hello", __FILE__), :formats => [:html] + render :file => File.expand_path("../../../fixtures/actionpack/hello", __FILE__), :formats => [:html] end # :ported: @@ -157,14 +157,14 @@ class TestController < ApplicationController # :ported: def render_file_with_instance_variables @secret = 'in the sauce' - path = File.join(File.dirname(__FILE__), '../fixtures/test/render_file_with_ivar') + path = File.join(File.dirname(__FILE__), '../../fixtures/test/render_file_with_ivar') render :file => path end # :ported: def render_file_as_string_with_instance_variables @secret = 'in the sauce' - path = File.expand_path(File.join(File.dirname(__FILE__), '../fixtures/test/render_file_with_ivar')) + path = File.expand_path(File.join(File.dirname(__FILE__), '../../fixtures/test/render_file_with_ivar')) render path end @@ -181,21 +181,21 @@ class TestController < ApplicationController def render_file_using_pathname @secret = 'in the sauce' - render :file => Pathname.new(File.dirname(__FILE__)).join('..', 'fixtures', 'test', 'dot.directory', 'render_file_with_ivar') + render :file => Pathname.new(File.dirname(__FILE__)).join('..', '..', 'fixtures', 'test', 'dot.directory', 'render_file_with_ivar') end def render_file_from_template @secret = 'in the sauce' - @path = File.expand_path(File.join(File.dirname(__FILE__), '../fixtures/test/render_file_with_ivar')) + @path = File.expand_path(File.join(File.dirname(__FILE__), '../../fixtures/test/render_file_with_ivar')) end def render_file_with_locals - path = File.join(File.dirname(__FILE__), '../fixtures/test/render_file_with_locals') + path = File.join(File.dirname(__FILE__), '../../fixtures/test/render_file_with_locals') render :file => path, :locals => {:secret => 'in the sauce'} end def render_file_as_string_with_locals - path = File.expand_path(File.join(File.dirname(__FILE__), '../fixtures/test/render_file_with_locals')) + path = File.expand_path(File.join(File.dirname(__FILE__), '../../fixtures/test/render_file_with_locals')) render path, :locals => {:secret => 'in the sauce'} end |