Sha256: 0469e8de2d4e63189a6c54154ebf92aa51a33eb8a6f3c9b3f9d8460a88d572e1
Contents?: true
Size: 811 Bytes
Versions: 4
Compression:
Stored size: 811 Bytes
Contents
# frozen_string_literal: true require 'test_helper' class Thinreports::Core::Shape::PageNumber::TestInterface < Minitest::Test include Thinreports::TestHelper PageNumber = Thinreports::Core::Shape::PageNumber def create_pageno(format = {}) report = Thinreports::Report.new layout: layout_file.path parent = report.start_new_page PageNumber::Interface.new parent, PageNumber::Format.new(format) end def test_format pageno = create_pageno 'format' => '{page}' assert_equal pageno.format, '{page}' pageno.format('{page} / {total}') assert_equal pageno.format, '{page} / {total}' end def test_reset_format pageno = create_pageno 'format' => '{page}' pageno.format('-- {page} --') pageno.reset_format assert_equal pageno.format, '{page}' end end
Version data entries
4 entries across 4 versions & 1 rubygems