lib/rubocop/cop/rspec/example_wording.rb in rubocop-rspec-1.2.0 vs lib/rubocop/cop/rspec/example_wording.rb in rubocop-rspec-1.2.1

- old
+ new

@@ -18,11 +18,11 @@ # it 'finds nothing' do # end class ExampleWording < Cop MSG = 'Do not use should when describing your tests.' - def on_block(node) + def on_block(node) # rubocop:disable Metrics/AbcSize method, _, _ = *node _, method_name, *args = *method return unless method_name == :it @@ -61,10 +61,10 @@ def simple_present(word) return custom_transform[word] if custom_transform[word] # ends with o s x ch sh or ss if %w(o s x]).include?(word[-1]) || - %w(ch sh ss]).include?(word[-2..-1]) + %w(ch sh ss]).include?(word[-2..-1]) return "#{word}es" end # ends with y if word[-1] == 'y' && !%w(a u i o e).include?(word[-2])