Sha256: 42c2cfae178553b8a71f334b539cc92d34abac5f8e89c6365401208f33a00332

Contents?: true

Size: 705 Bytes

Versions: 4

Compression:

Stored size: 705 Bytes

Contents

# coding: utf-8

require 'test/unit/helper'

class ThinReports::Core::Shape::TextBlock::Formatter::TestBasic < MiniTest::Unit::TestCase
  include ThinReports::TestHelpers
  
  # Alias
  Formatter = ThinReports::Core::Shape::TextBlock::Formatter::Basic
  
  def test_apply_simple_format
    format = flexmock(:format_base => 'Hello {value}!')
    
    assert_equal Formatter.new(format).apply('ThinReports'),
                 'Hello ThinReports!'
  end
  
  def test_apply_multiple_format
    format = flexmock(: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.7.7 test/unit/core/shape/text_block/formatter/test_basic.rb
thinreports-0.7.6 test/unit/core/shape/text_block/formatter/test_basic.rb
thinreports-0.7.5 test/unit/core/shape/text_block/formatter/test_basic.rb
thinreports-0.7.0 test/unit/core/shape/text_block/formatter/test_basic.rb