Sha256: 3766197069d9c4ef98bed4553a712e7194308adffccb224d294a68523e515fd1

Contents?: true

Size: 676 Bytes

Versions: 4

Compression:

Stored size: 676 Bytes

Contents

# frozen_string_literal: true

require 'test_helper'

class Thinreports::Core::Shape::TextBlock::Formatter::TestBasic < Minitest::Test
  include Thinreports::TestHelper

  # Alias
  Formatter = Thinreports::Core::Shape::TextBlock::Formatter::Basic

  def test_apply_simple_format
    format = stub(format_base: 'Hello {value}!')

    assert_equal Formatter.new(format).apply('Thinreports'),
                 'Hello Thinreports!'
  end

  def test_apply_multiple_format
    format = stub(format_base: 'Hello {value}! And good bye {value}.')

    assert_equal Formatter.new(format).apply('Thinreports'),
                 'Hello Thinreports! And good bye Thinreports.'
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
thinreports-0.10.3 test/units/core/shape/text_block/formatter/test_basic.rb
thinreports-0.10.2 test/unit/core/shape/text_block/formatter/test_basic.rb
thinreports-0.10.1 test/unit/core/shape/text_block/formatter/test_basic.rb
thinreports-0.10.0 test/unit/core/shape/text_block/formatter/test_basic.rb