Sha256: 061906cb6e85325d1cd6d2b26d902261ad273fbf3ef58cd88608e9be8d27422d

Contents?: true

Size: 926 Bytes

Versions: 24

Compression:

Stored size: 926 Bytes

Contents

require 'test/unit'

require 'rd/inline-element'

include RD

class TestStringElement < Test::Unit::TestCase
  def test_to_label
    el = StringElement.new "label"
    assert_equal("label", el.to_label)
    ws = StringElement.new " label "
    assert_equal(" label ", ws.to_label)
    empty = StringElement.new ""
    assert_equal("", empty.to_label)    
  end

  def test_content
    el = StringElement.new ""
    assert_equal("", el.content)
    el.content = "label"
    assert_equal("label", el.content)
  end
end

class TestVerb < Test::Unit::TestCase
  def test_to_label
    el = Verb.new "label"
    assert_equal("label", el.to_label)
    ws = Verb.new " label "
    assert_equal("label", ws.to_label)
    empty = Verb.new ""
    assert_equal("", empty.to_label)    
  end

  def test_content
    el = Verb.new ""
    assert_equal("", el.content)
    el.content = "label"
    assert_equal("label", el.content)
  end
end

Version data entries

24 entries across 23 versions & 2 rubygems

Version Path
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/rdtool-0.6.38/test/test-terminal-inline.rb
tdiary-5.0.8 vendor/bundle/gems/rdtool-0.6.38/test/test-terminal-inline.rb
tdiary-5.0.5 vendor/bundle/gems/tdiary-5.0.4/vendor/bundle/gems/rdtool-0.6.38/test/test-terminal-inline.rb
tdiary-5.0.5 vendor/bundle/gems/rdtool-0.6.38/test/test-terminal-inline.rb
tdiary-5.0.4 vendor/bundle/gems/rdtool-0.6.38/test/test-terminal-inline.rb
tdiary-4.2.1 vendor/bundle/ruby/2.2.0/gems/rdtool-0.6.38/test/test-terminal-inline.rb
tdiary-3.2.2.20130518 vendor/rdtool-0.6.38/test/test-terminal-inline.rb
tdiary-3.2.2.20130508 vendor/rdtool-0.6.38/test/test-terminal-inline.rb
tdiary-3.2.2.20130507 vendor/rdtool-0.6.38/test/test-terminal-inline.rb
rdtool-0.6.38 test/test-terminal-inline.rb
rdtool-0.6.37 test/test-terminal-inline.rb
rdtool-0.6.36 test/test-terminal-inline.rb
rdtool-0.6.35 test/test-terminal-inline.rb
rdtool-0.6.34 test/test-terminal-inline.rb
rdtool-0.6.33 test/test-terminal-inline.rb
rdtool-0.6.32 test/test-terminal-inline.rb
rdtool-0.6.31 test/test-terminal-inline.rb
rdtool-0.6.30 test/test-terminal-inline.rb
rdtool-0.6.29 test/test-terminal-inline.rb
rdtool-0.6.28 test/test-terminal-inline.rb