Permalink
Browse files

Move actionpack's controller tests

  • Loading branch information...
1 parent 34a2e48 commit 7620ab08be5cbc3621169d1b0e0bcd628732905b @lukaszx0 lukaszx0 committed Aug 13, 2013
View
@@ -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
@@ -2,7 +2,7 @@
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
@@ -9,7 +9,7 @@
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 @@ def render(*args)
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 @@ class HasNilLayoutProc < LayoutTest
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
@@ -88,7 +88,7 @@ def hello_world
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 @@ def hello_world_with_layout_false
# :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 @@ def render_file_not_using_full_path_with_dot_in_path
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

0 comments on commit 7620ab0

Please sign in to comment.