Module: CommitMeat::Tests
- Included in:
- Tester
- Defined in:
- lib/commit-meat/tester.rb
Instance Method Summary collapse
Instance Method Details
#has_only_one_word ⇒ Object
33 34 35 |
# File 'lib/commit-meat/tester.rb', line 33 def has_only_one_word @message.split.size > 1 end |
#includes_bad_words ⇒ Object
37 38 39 40 41 42 43 44 45 46 |
# File 'lib/commit-meat/tester.rb', line 37 def includes_bad_words bad_words = YAML::load_file(File.join(File.dirname(File.(__FILE__)), 'config/bad_words.yml')) bad_words_found = [] bad_words.each do |word| bad_words_found << word if @message.include?(word) end bad_words_found.any? end |