Sha256: f29941c92f7e8ee6623cee3fbaaf34fc981049c4bffcad6381978c55957f6f6e
Contents?: true
Size: 939 Bytes
Versions: 2
Compression:
Stored size: 939 Bytes
Contents
#!/usr/bin/env ruby # encoding: utf-8 # TestObject -- rpdf2txt -- 26.05.2011 -- mhatakeyama@ywesee.com $: << File.expand_path('../lib', File.dirname(__FILE__)) require 'test/unit' require 'flexmock' require 'rpdf2txt/object' module Rpdf2txt class TestPageLeaf < Test::Unit::TestCase include FlexMock::TestCase def test_merge_snippets pageleaf = Rpdf2txt::PageLeaf.new snippet1 = flexmock('snippet1', :txt => 'txt1', :txt= => nil ) snippet2 = flexmock('snippet2', :txt => 'txt2', :txt= => nil ) text_snippets = [snippet1, snippet2, snippet2] result = pageleaf.merge_snippets(text_snippets) assert_equal(2, result.length) assert_kind_of(snippet1.class, result[0]) assert_kind_of(snippet2.class, result[1]) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rpdf2txt-0.8.4 | test/test_object.rb |
rpdf2txt-0.8.3 | test/test_object.rb |