Sha256: 0972f42d1bc35d8c6b79ea754410a0714fa1143197f9250be40c71798cb97ad5

Contents?: true

Size: 755 Bytes

Versions: 12

Compression:

Stored size: 755 Bytes

Contents

require 'test_helper'

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

   def test_basics
      footers = []

      footers << FooterNode.new(@document)
      footers << FooterNode.new(@document, FooterNode::LEFT_PAGE)

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

      assert(footers[0].type == FooterNode::UNIVERSAL)
      assert(footers[1].type == FooterNode::LEFT_PAGE)
   end

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

Version data entries

12 entries across 12 versions & 4 rubygems

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