Class: ODDB::TestOrphanRule
- Defined in:
- ext/fipdf/test/rules_test.rb
Instance Method Summary collapse
- #setup ⇒ Object
- #test_orphan_fulfilled ⇒ Object
- #test_orphan_multiple_page_breaks ⇒ Object
- #test_orphan_not_fulfilled ⇒ Object
- #test_orphan_not_fulfilled2 ⇒ Object
- #test_orphan_single_line ⇒ Object
Instance Method Details
#setup ⇒ Object
43 44 45 |
# File 'ext/fipdf/test/rules_test.rb', line 43 def setup @orphan_rule = ODDB::FiPDF::OrphanRule.new(:orphan_rule) end |
#test_orphan_fulfilled ⇒ Object
46 47 48 49 50 51 |
# File 'ext/fipdf/test/rules_test.rb', line 46 def test_orphan_fulfilled @orphan_rule.notify(:add_text_wrap) @orphan_rule.notify(:add_text_wrap) @orphan_rule.notify(:ez_new_page) assert_equal(true, @orphan_rule.fulfilled?) end |
#test_orphan_multiple_page_breaks ⇒ Object
71 72 73 74 75 76 77 78 |
# File 'ext/fipdf/test/rules_test.rb', line 71 def test_orphan_multiple_page_breaks @orphan_rule.notify(:add_text_wrap) @orphan_rule.notify(:ez_new_page) @orphan_rule.notify(:add_text_wrap) @orphan_rule.notify(:add_text_wrap) @orphan_rule.notify(:ez_new_page) assert_equal(false, @orphan_rule.fulfilled?) end |
#test_orphan_not_fulfilled ⇒ Object
52 53 54 55 56 57 |
# File 'ext/fipdf/test/rules_test.rb', line 52 def test_orphan_not_fulfilled @orphan_rule.notify(:add_text_wrap) @orphan_rule.notify(:ez_new_page) @orphan_rule.notify(:add_text_wrap) assert_equal(false, @orphan_rule.fulfilled?) end |
#test_orphan_not_fulfilled2 ⇒ Object
58 59 60 61 62 63 64 65 |
# File 'ext/fipdf/test/rules_test.rb', line 58 def test_orphan_not_fulfilled2 @orphan_rule.notify(:add_text_wrap) @orphan_rule.notify(:ez_new_page) @orphan_rule.notify(:add_text_wrap) @orphan_rule.notify(:add_text_wrap) @orphan_rule.notify(:add_text_wrap) assert_equal(false, @orphan_rule.fulfilled?) end |
#test_orphan_single_line ⇒ Object
66 67 68 69 70 |
# File 'ext/fipdf/test/rules_test.rb', line 66 def test_orphan_single_line @orphan_rule.notify(:add_text_wrap) @orphan_rule.notify(:ez_new_page) assert_equal(true, @orphan_rule.fulfilled?) end |