Class: CommitMeat::Tester
- Inherits:
-
Object
- Object
- CommitMeat::Tester
- Defined in:
- lib/commit-meat/tester.rb
Instance Attribute Summary collapse
-
#failure_messages ⇒ Object
readonly
Returns the value of attribute failure_messages.
-
#warning_messages ⇒ Object
readonly
Returns the value of attribute warning_messages.
Instance Method Summary collapse
- #has_failures? ⇒ Boolean
- #has_messages? ⇒ Boolean
- #has_warnings? ⇒ Boolean
-
#initialize(message) ⇒ Tester
constructor
A new instance of Tester.
- #test ⇒ Object
Constructor Details
#initialize(message) ⇒ Tester
Returns a new instance of Tester.
7 8 9 10 11 |
# File 'lib/commit-meat/tester.rb', line 7 def initialize() = = [] = [] end |
Instance Attribute Details
#failure_messages ⇒ Object (readonly)
Returns the value of attribute failure_messages.
5 6 7 |
# File 'lib/commit-meat/tester.rb', line 5 def end |
#warning_messages ⇒ Object (readonly)
Returns the value of attribute warning_messages.
5 6 7 |
# File 'lib/commit-meat/tester.rb', line 5 def end |
Instance Method Details
#has_failures? ⇒ Boolean
21 22 23 |
# File 'lib/commit-meat/tester.rb', line 21 def has_failures? .any? end |
#has_messages? ⇒ Boolean
13 14 15 |
# File 'lib/commit-meat/tester.rb', line 13 def has_warnings? || has_failures? end |
#has_warnings? ⇒ Boolean
17 18 19 |
# File 'lib/commit-meat/tester.rb', line 17 def has_warnings? .any? end |
#test ⇒ Object
25 26 27 28 |
# File 'lib/commit-meat/tester.rb', line 25 def test fail_if :has_only_one_word, "A single word commit message? really?" warn_if :includes_bad_words, "$@#! - [gets shocked by a V-chip]" end |