Class: ODDB::TestWidowRule
- Defined in:
- ext/fipdf/test/rules_test.rb
Instance Method Summary collapse
- #setup ⇒ Object
- #test_widow_rule_fulfilled ⇒ Object
- #test_widow_rule_not_fulfilled ⇒ Object
- #test_widow_single_line ⇒ Object
Instance Method Details
#setup ⇒ Object
81 82 83 |
# File 'ext/fipdf/test/rules_test.rb', line 81 def setup @widow_rule = ODDB::FiPDF::WidowRule.new(:widow_rule) end |
#test_widow_rule_fulfilled ⇒ Object
84 85 86 87 88 89 |
# File 'ext/fipdf/test/rules_test.rb', line 84 def test_widow_rule_fulfilled @widow_rule.notify(:add_text_wrap) @widow_rule.notify(:add_text_wrap) @widow_rule.notify(:ez_new_page) assert_equal(true, @widow_rule.fulfilled?) end |
#test_widow_rule_not_fulfilled ⇒ Object
90 91 92 93 94 95 |
# File 'ext/fipdf/test/rules_test.rb', line 90 def test_widow_rule_not_fulfilled @widow_rule.notify(:add_text_wrap) @widow_rule.notify(:ez_new_page) @widow_rule.notify(:add_text_wrap) assert_equal(false, @widow_rule.fulfilled?) end |
#test_widow_single_line ⇒ Object
96 97 98 99 |
# File 'ext/fipdf/test/rules_test.rb', line 96 def test_widow_single_line @widow_rule.notify(:add_text_wrap) assert_equal(true, @widow_rule.fulfilled?) end |