mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
Make template_test work with old Rails versions.
This commit is contained in:
parent
15a84c38e6
commit
71c0146626
1 changed files with 5 additions and 1 deletions
|
@ -74,7 +74,11 @@ class TemplateTest < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
def assert_renders_correctly(name, &render_method)
|
||||
render_method ||= proc { |name| @base.render(:file => name) }
|
||||
if ActionPack::VERSION::MAJOR < 2 || ActionPack::VERSION::MINOR < 2
|
||||
render_method ||= proc { |name| @base.render(name) }
|
||||
else
|
||||
render_method ||= proc { |name| @base.render(:file => name) }
|
||||
end
|
||||
|
||||
load_result(name).split("\n").zip(render_method[name].split("\n")).each_with_index do |pair, line|
|
||||
message = "template: #{name}\nline: #{line}"
|
||||
|
|
Loading…
Reference in a new issue