require 'spec_helper' require 'turnip_formatter/printer/step_extra_args' module TurnipFormatter::Printer describe StepExtraArgs do context 'Turnip::Table' do describe '.print_out' do let(:string) do ::Turnip::Table.new([ ["State", "Money"], ["", "555"], ["", "368"] ]) end subject { StepExtraArgs.print_out(string) } it { should match %r{State[[:space:]]*Money} } it { should match %r{<Tokushima>[[:space:]]*555} } it { should match %r{<Okinawa>[[:space:]]*368} } end end context 'String' do describe '.print_out' do let(:string) { 'aa' } subject { StepExtraArgs.print_out(string) } it { should match %r{
a<a>a
} } end end end end