lib/rubocop/cop/rspec/context_wording.rb in rubocop-rspec-2.13.2 vs lib/rubocop/cop/rspec/context_wording.rb in rubocop-rspec-2.14.0

- old
+ new

@@ -41,11 +41,11 @@ # @example `AllowedPatterns` configuration # # # .rubocop.yml # # RSpec/ContextWording: # # AllowedPatterns: - # # - /とき$/ + # # - とき$ # # @example # # bad # context '条件を満たす' do # # ... @@ -90,10 +90,12 @@ !matches_allowed_pattern?(description) end def expect_patterns - inspected = allowed_patterns.map(&:inspect) + inspected = allowed_patterns.map do |pattern| + pattern.inspect.gsub(/\A"|"\z/, '/') + end return inspected.first if inspected.size == 1 inspected << "or #{inspected.pop}" inspected.join(', ') end