Sha256: 61af18ba4e20e1428654f89efd91644e811147d7ef65e253771ebb3249dab317

Contents?: true

Size: 414 Bytes

Versions: 3

Compression:

Stored size: 414 Bytes

Contents

# encoding: utf-8

require 'test_helper'

class TabularTextLineTest < ActiveSupport::TestCase
  setup do
    @line = TabularText::Line.new
  end

  test 'joins fields'do
    2.times do
      @line.field "STR"
    end

    assert_equal "STRSTR", @line.to_s
  end  

  test 'creates with content and length' do
    @line.field "STR", 10

    assert_equal TabularText::Field.new("STR", 10).to_s, @line.to_s
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
tabular-text-0.1.0 test/unit/line_test.rb
tabular-text-0.0.2 test/unit/line_test.rb
tabular-text-0.0.1 test/unit/line_test.rb