Sha256: 691a7ce87fd284b1e07fea78687dd37174d72d57389b9600ab0579b7ef1bc512

Contents?: true

Size: 673 Bytes

Versions: 146

Compression:

Stored size: 673 Bytes

Contents

require 'test_helper'
require 'tins/xt/to'

module Tins
  class ToTest < Test::Unit::TestCase
    def test_to_removing_leading_spaces
      doc = to(<<-end)
        hello, world
      end
      assert_equal "hello, world\n", doc
    end

    def test_to_removing_leading_spaces_depending_on_first_line
      doc = to(<<-end)
        hello
          world,
            how are
          things?
      end
      assert_equal "hello\n  world,\n    how are\n  things?\n", doc
    end

    def test_to_not_removing_empty_lines
      doc = to(<<-end)
        hello, world

        another line
      end
      assert_equal "hello, world\n\nanother line\n", doc
    end
  end
end

Version data entries

146 entries across 128 versions & 9 rubygems

Version Path
tins-1.38.0 tests/to_test.rb
tins-1.37.1 tests/to_test.rb
tins-1.37.0 tests/to_test.rb
tins-1.36.1 tests/to_test.rb
tins-1.36.0 tests/to_test.rb
tins-1.35.0 tests/to_test.rb
tins-1.34.0 tests/to_test.rb
tins-1.33.0 tests/to_test.rb
tdiary-5.2.4 vendor/bundle/ruby/3.1.0/gems/tins-1.31.1/tests/to_test.rb
tins-1.32.1 tests/to_test.rb
tins-1.32.0 tests/to_test.rb
tdiary-5.2.3 vendor/bundle/ruby/3.1.0/gems/tins-1.31.1/tests/to_test.rb
tdiary-5.2.2 vendor/bundle/ruby/3.1.0/gems/tins-1.31.1/tests/to_test.rb
tins-1.31.1 tests/to_test.rb
tdiary-5.2.1 vendor/bundle/ruby/3.1.0/gems/tins-1.31.0/tests/to_test.rb
tins-1.31.0 tests/to_test.rb
tins-1.30.0 tests/to_test.rb
tdiary-5.2.0 vendor/bundle/ruby/3.0.0/gems/tins-1.29.1/tests/to_test.rb
tdiary-5.2.0 vendor/bundle/ruby/2.7.0/gems/tins-1.29.1/tests/to_test.rb
tdiary-5.1.7 vendor/bundle/ruby/3.0.0/gems/tins-1.29.1/tests/to_test.rb