Sha256: 31976cfaef05910d657279986699178cec7150d3ad2c175fe0f3d1c4d6993157

Contents?: true

Size: 757 Bytes

Versions: 12

Compression:

Stored size: 757 Bytes

Contents

require 'test_helper'

# Information class unit test class.
class HeaderNodeTest < Test::Unit::TestCase
   def setup
      @document = Document.new(Font.new(Font::ROMAN, 'Arial'))
   end

   def test_basics
      headers = []

      headers << HeaderNode.new(@document)
      headers << HeaderNode.new(@document, HeaderNode::LEFT_PAGE)

      assert(headers[0].parent == @document)
      assert(headers[1].parent == @document)

      assert(headers[0].type == HeaderNode::UNIVERSAL)
      assert(headers[1].type == HeaderNode::LEFT_PAGE)
   end

   def test_exceptions
      headers = HeaderNode.new(@document)
      begin
         headers.footnote("La la la.")
         flunk("Successfully added a footnote to a header.")
      rescue
      end
   end
end

Version data entries

12 entries across 12 versions & 4 rubygems

Version Path
thechrisoshow-ruby-rtf-0.2.0 test/header_node_test.rb
rtf-0.3.3 test/header_node_test.rb
rtf-0.3.2 test/header_node_test.rb
rtf-0.3.0 test/header_node_test.rb
panmind-rtf-0.4.1 test/header_node_test.rb
panmind-rtf-0.4.0 test/header_node_test.rb
clbustos-rtf-0.3.1 test/header_node_test.rb
panmind-rtf-0.3.1 test/header_node_test.rb
clbustos-rtf-0.3.0 test/header_node_test.rb
clbustos-rtf-0.2.2 test/header_node_test.rb
clbustos-rtf-0.2.1 test/header_node_test.rb
clbustos-rtf-0.1.2 test/header_node_test.rb