Sha256: f3f7f2626d446fe9950fa176ab89962d0ee101a59c928d1f9cedd2fdb4dd86cf
Contents?: true
Size: 769 Bytes
Versions: 2
Compression:
Stored size: 769 Bytes
Contents
require "test_helper" class RendererTest < Test::Unit::TestCase def setup Paginate.setup do |config| config.param_name = :page config.size = 10 end I18n.locale = :en @renderer = Paginate::Renderer.new({ :collection => Array.new(11), :page => 1, :fullpath => "/some/path" }) end def test_safe_html string = String.new string.expects(:respond_to?).with(:html_safe).returns(true) string.expects(:html_safe) String.expects(:new).returns(string) @renderer.render end def test_no_safe_html string = String.new string.expects(:respond_to?).with(:html_safe).returns(false) string.expects(:html_safe).never String.expects(:new).returns(string) @renderer.render end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
paginate-0.1.1 | test/paginate/renderer_test.rb |
paginate-0.1.0 | test/paginate/renderer_test.rb |