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:
parent
956f2d98b1
commit
a66ba5be6d
1 changed files with 7 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue