Sha256: aa204d3e80c270749ab878f749f130f7510c1f1c558e32befc6f92c4be93f045

Contents?: true

Size: 662 Bytes

Versions: 5

Compression:

Stored size: 662 Bytes

Contents

# coding: utf-8

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

5 entries across 5 versions & 1 rubygems

Version Path
thinreports-0.9.1 test/unit/core/shape/text_block/formatter/test_basic.rb
thinreports-0.9.0 test/unit/core/shape/text_block/formatter/test_basic.rb
thinreports-0.8.2 test/unit/core/shape/text_block/formatter/test_basic.rb
thinreports-0.8.1 test/unit/core/shape/text_block/formatter/test_basic.rb
thinreports-0.8.0 test/unit/core/shape/text_block/formatter/test_basic.rb