Sha256: 784f1da01dc69a7aa142bcce49d7b2646c8e0e6a6f31e759ead9d751ff0aee70

Contents?: true

Size: 779 Bytes

Versions: 6

Compression:

Stored size: 779 Bytes

Contents

# -*- coding: utf-8 -*-

require 'spec_helper'
require 'turnip/table'
require 'turnip_formatter/template/step_outline'

module TurnipFormatter
  class Template
    describe StepOutline do
      let(:template) { ::TurnipFormatter::Template::StepOutline }

      let(:string) do
        ::Turnip::Table.new([
            ["State", "Money"],
            ["<Tokushima>", "555"],
            ["<Okinawa>", "368"]
          ])
      end

      describe '.build' do
        subject { template.build(string) }

        it do
          should match %r{<td>State</td>[[:space:]]+<td>Money</td>}
          should match %r{<td>&lt;Tokushima&gt;</td>[[:space:]]+<td>555</td>}
          should match %r{<td>&lt;Okinawa&gt;</td>[[:space:]]+<td>368</td>}
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
turnip_formatter-0.1.2 spec/turnip_formatter/template/step_outline_spec.rb
turnip_formatter-0.1.1 spec/turnip_formatter/template/step_outline_spec.rb
turnip_formatter-0.1.0 spec/turnip_formatter/template/step_outline_spec.rb
turnip_formatter-0.0.6 spec/turnip_formatter/template/step_outline_spec.rb
turnip_formatter-0.0.5 spec/turnip_formatter/template/step_outline_spec.rb
turnip_formatter-0.0.4 spec/turnip_formatter/template/step_outline_spec.rb