public
Rubygem
Description: Most awesome pagination solution for Ruby
Homepage: http://github.com/mislav/will_paginate/wikis
Clone URL: git://github.com/mislav/will_paginate.git
Search Repo:
fix view tests for Rails 2.1
mislav (author)
Sun Apr 06 12:49:32 -0700 2008
commit  6d64899d9405486039b9ba9ab8f3df1b920a777a
tree    2726c3b83d237974d977bdaacc083e13ec21a651
parent  efe2c81322301bc0b1b62e211f199b7959b0dca3
...
182
183
184
185
186
187
 
 
 
 
 
 
 
 
 
 
 
188
189
190
...
182
183
184
 
 
 
185
186
187
188
189
190
191
192
193
194
195
196
197
198
0
@@ -182,9 +182,17 @@ class ViewTest < Test::Unit::TestCase
0
         collection = [1].paginate(page_options)
0
       end
0
 
0
- @html_result = @view.render_template nil, @template, nil,
0
- :collection => collection, :options => options
0
-
0
+ locals = { :collection => collection, :options => options }
0
+
0
+ if defined? ActionView::Template
0
+ # Rails 2.1
0
+ args = [ ActionView::Template.new(@view, @template, false, locals, true, nil) ]
0
+ else
0
+ # older Rails versions
0
+ args = [nil, @template, nil, locals]
0
+ end
0
+
0
+ @html_result = @view.render_template(*args)
0
       @html_document = HTML::Document.new(@html_result, true, false)
0
 
0
       if block_given?

Comments

    No one has commented yet.