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

[Haml] Fix a Rails 3.x test error.

This commit is contained in:
Nathan Weizenbaum 2009-07-04 19:04:42 -07:00
parent a2d1597fd1
commit 1ae4308e85

View file

@ -95,7 +95,8 @@ class TemplateTest < Test::Unit::TestCase
end
def assert_renders_correctly(name, &render_method)
if ActionPack::VERSION::MAJOR < 2 || ActionPack::VERSION::MINOR < 2
if ActionPack::VERSION::MAJOR < 2 ||
(ActionPack::VERSION::MAJOR == 2 && ActionPack::VERSION::MINOR < 2)
render_method ||= proc { |name| @base.render(name) }
else
render_method ||= proc { |name| @base.render(:file => name) }