1
0
Fork 0
mirror of https://github.com/haml/haml.git synced 2022-11-09 12:33:31 -05:00

[Haml] Make TemplateTest run with the latest edge Rails.

This commit is contained in:
Nathan Weizenbaum 2010-03-01 18:20:04 -08:00
parent 956f2d98b1
commit a66ba5be6d

View file

@ -80,7 +80,13 @@ class TemplateTest < Test::Unit::TestCase
# It's usually provided by ActionController::Base.
def base.protect_against_forgery?; false; end
base.controller = DummyController.new
# In Rails <= 2.1, a fake controller object was needed
# to provide the controller path.
if ActionPack::VERSION::MAJOR < 2 ||
(ActionPack::VERSION::MAJOR == 2 && ActionPack::VERSION::MINOR < 2)
base.controller = DummyController.new
end
base
end