class RSpec::Matchers::BuiltIn::RespondTo

def with_keywords_string

def with_keywords_string
  kw_str = case @expected_keywords.count
           when 1
             @expected_keywords.first.inspect
           when 2
             @expected_keywords.map(&:inspect).join(' and ')
           else
             "#{@expected_keywords[0...-1].map(&:inspect).join(', ')}, and #{@expected_keywords.last.inspect}"
           end
  "keyword#{@expected_keywords.count == 1 ? '' : 's'} #{kw_str}"
end