rubocop-rspec 1.18.0 → 1.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +2 -2
  3. data/lib/rubocop/cop/rspec/align_left_let_brace.rb +1 -1
  4. data/lib/rubocop/cop/rspec/align_right_let_brace.rb +1 -1
  5. data/lib/rubocop/cop/rspec/any_instance.rb +5 -1
  6. data/lib/rubocop/cop/rspec/around_block.rb +7 -3
  7. data/lib/rubocop/cop/rspec/be_eql.rb +4 -2
  8. data/lib/rubocop/cop/rspec/before_after_all.rb +5 -1
  9. data/lib/rubocop/cop/rspec/capybara/current_path_expectation.rb +2 -2
  10. data/lib/rubocop/cop/rspec/capybara/feature_methods.rb +6 -2
  11. data/lib/rubocop/cop/rspec/describe_class.rb +4 -4
  12. data/lib/rubocop/cop/rspec/describe_method.rb +1 -1
  13. data/lib/rubocop/cop/rspec/describe_symbol.rb +4 -2
  14. data/lib/rubocop/cop/rspec/described_class.rb +6 -2
  15. data/lib/rubocop/cop/rspec/empty_example_group.rb +1 -1
  16. data/lib/rubocop/cop/rspec/empty_line_after_final_let.rb +6 -14
  17. data/lib/rubocop/cop/rspec/empty_line_after_subject.rb +2 -2
  18. data/lib/rubocop/cop/rspec/example_length.rb +1 -1
  19. data/lib/rubocop/cop/rspec/example_wording.rb +1 -1
  20. data/lib/rubocop/cop/rspec/expect_actual.rb +1 -1
  21. data/lib/rubocop/cop/rspec/expect_in_hook.rb +3 -3
  22. data/lib/rubocop/cop/rspec/expect_output.rb +1 -1
  23. data/lib/rubocop/cop/rspec/factory_girl/dynamic_attribute_defined_statically.rb +3 -3
  24. data/lib/rubocop/cop/rspec/file_path.rb +1 -1
  25. data/lib/rubocop/cop/rspec/focus.rb +3 -3
  26. data/lib/rubocop/cop/rspec/hook_argument.rb +10 -2
  27. data/lib/rubocop/cop/rspec/implicit_expect.rb +8 -4
  28. data/lib/rubocop/cop/rspec/instance_spy.rb +5 -5
  29. data/lib/rubocop/cop/rspec/instance_variable.rb +1 -1
  30. data/lib/rubocop/cop/rspec/invalid_predicate_matcher.rb +2 -2
  31. data/lib/rubocop/cop/rspec/it_behaves_like.rb +1 -1
  32. data/lib/rubocop/cop/rspec/iterated_expectation.rb +2 -2
  33. data/lib/rubocop/cop/rspec/leading_subject.rb +2 -2
  34. data/lib/rubocop/cop/rspec/let_before_examples.rb +2 -2
  35. data/lib/rubocop/cop/rspec/let_setup.rb +5 -3
  36. data/lib/rubocop/cop/rspec/message_chain.rb +1 -1
  37. data/lib/rubocop/cop/rspec/message_expectation.rb +3 -3
  38. data/lib/rubocop/cop/rspec/message_spies.rb +7 -5
  39. data/lib/rubocop/cop/rspec/multiple_describes.rb +1 -1
  40. data/lib/rubocop/cop/rspec/multiple_expectations.rb +6 -2
  41. data/lib/rubocop/cop/rspec/multiple_subjects.rb +2 -2
  42. data/lib/rubocop/cop/rspec/named_subject.rb +2 -2
  43. data/lib/rubocop/cop/rspec/nested_groups.rb +5 -1
  44. data/lib/rubocop/cop/rspec/not_to_not.rb +1 -1
  45. data/lib/rubocop/cop/rspec/overwriting_setup.rb +6 -2
  46. data/lib/rubocop/cop/rspec/predicate_matcher.rb +26 -14
  47. data/lib/rubocop/cop/rspec/repeated_description.rb +1 -1
  48. data/lib/rubocop/cop/rspec/repeated_example.rb +1 -1
  49. data/lib/rubocop/cop/rspec/return_from_stub.rb +17 -5
  50. data/lib/rubocop/cop/rspec/scattered_let.rb +2 -2
  51. data/lib/rubocop/cop/rspec/scattered_setup.rb +1 -1
  52. data/lib/rubocop/cop/rspec/shared_context.rb +5 -1
  53. data/lib/rubocop/cop/rspec/single_argument_message_chain.rb +1 -1
  54. data/lib/rubocop/cop/rspec/subject_stub.rb +8 -6
  55. data/lib/rubocop/cop/rspec/verified_doubles.rb +2 -2
  56. data/lib/rubocop/cop/rspec/void_expect.rb +2 -2
  57. data/lib/rubocop/rspec/example_group.rb +1 -1
  58. data/lib/rubocop/rspec/language/node_pattern.rb +1 -1
  59. data/lib/rubocop/rspec/version.rb +1 -1
  60. data/rubocop-rspec.gemspec +1 -1
  61. data/spec/rubocop/cop/rspec/cop_spec.rb +1 -1
  62. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fef3eb92e763b31bdcf1b4a1adc0557e603b63d6
4
- data.tar.gz: 48a039a782f517efb9cd9b7ff84f30acce3b9644
3
+ metadata.gz: 98cb4ed6eefcee97bb8b5dea2093bb2cab7abc99
4
+ data.tar.gz: ce92dd968c520f5dbe633443262235b05f038cf1
5
5
  SHA512:
6
- metadata.gz: 98638e435ef551ee81ee340767d6adf1de37bf36f3b848514cd244fbb6b7d8a43c2a30c049eb6454376e35d98f86f17e3bd2afbcc985ef424a73499c3b182ba6
7
- data.tar.gz: a4024e740e9a5fc79189dfae61b2ba62e5b2ea649f78be9c3aa1b733c47b7bb9bed4a73744e4773f2cd402f8d99caae2e6c1d5e509d07cda2d789730d8783a18
6
+ metadata.gz: c89f710f27e3fe8695428c11866a4f853a1397a5adece3f89963d73521edd8ea102f29e625756390d99d27afe2f33d620b0da3e761e361800eac04bef3f450f2
7
+ data.tar.gz: 3464b491a898fa51fa8709fa632274b221f44529845bd291d892706bdc5e9fc99e1ea234fa54b331b6af1aa6544e57397c68add5cd4c96e37fd68b0f527d91d7
data/Rakefile CHANGED
@@ -6,8 +6,8 @@ require 'bundler/gem_tasks'
6
6
  begin
7
7
  Bundler.setup(:default, :development)
8
8
  rescue Bundler::BundlerError => e
9
- $stderr.puts e.message
10
- $stderr.puts 'Run `bundle install` to install missing gems'
9
+ warn e.message
10
+ warn 'Run `bundle install` to install missing gems'
11
11
  exit e.status_code
12
12
  end
13
13
 
@@ -26,7 +26,7 @@ module RuboCop
26
26
 
27
27
  def investigate(_)
28
28
  token_aligner.offending_tokens.each do |let|
29
- add_offense(let, :begin)
29
+ add_offense(let, location: :begin)
30
30
  end
31
31
  end
32
32
 
@@ -26,7 +26,7 @@ module RuboCop
26
26
 
27
27
  def investigate(_)
28
28
  token_aligner.offending_tokens.each do |let|
29
- add_offense(let, :end)
29
+ add_offense(let, location: :end)
30
30
  end
31
31
  end
32
32
 
@@ -29,7 +29,11 @@ module RuboCop
29
29
 
30
30
  def on_send(node)
31
31
  disallowed_stub(node) do |method|
32
- add_offense(node, :expression, format(MSG, method: method))
32
+ add_offense(
33
+ node,
34
+ location: :expression,
35
+ message: format(MSG, method: method)
36
+ )
33
37
  end
34
38
  end
35
39
  end
@@ -29,7 +29,7 @@ module RuboCop
29
29
  'or `%<arg>s.run`.'.freeze
30
30
 
31
31
  def_node_matcher :hook, <<-PATTERN
32
- (block {(send nil :around) (send nil :around sym)} (args $...) ...)
32
+ (block {(send nil? :around) (send nil? :around sym)} (args $...) ...)
33
33
  PATTERN
34
34
 
35
35
  def_node_search :find_arg_usage, <<-PATTERN
@@ -49,7 +49,7 @@ module RuboCop
49
49
  private
50
50
 
51
51
  def add_no_arg_offense(node)
52
- add_offense(node, :expression, MSG_NO_ARG)
52
+ add_offense(node, location: :expression, message: MSG_NO_ARG)
53
53
  end
54
54
 
55
55
  def check_for_unused_proxy(block, proxy)
@@ -59,7 +59,11 @@ module RuboCop
59
59
  return if usage.include?(s(:lvar, name))
60
60
  end
61
61
 
62
- add_offense(proxy, :expression, format(MSG_UNUSED_ARG, arg: name))
62
+ add_offense(
63
+ proxy,
64
+ location: :expression,
65
+ message: format(MSG_UNUSED_ARG, arg: name)
66
+ )
63
67
  end
64
68
  end
65
69
  end
@@ -37,11 +37,13 @@ module RuboCop
37
37
  MSG = 'Prefer `be` over `eql`.'.freeze
38
38
 
39
39
  def_node_matcher :eql_type_with_identity, <<-PATTERN
40
- (send _ :to $(send nil :eql {true false int float sym nil_type?}))
40
+ (send _ :to $(send nil? :eql {true false int float sym nil_type?}))
41
41
  PATTERN
42
42
 
43
43
  def on_send(node)
44
- eql_type_with_identity(node) { |eql| add_offense(eql, :selector) }
44
+ eql_type_with_identity(node) do |eql|
45
+ add_offense(eql, location: :selector)
46
+ end
45
47
  end
46
48
 
47
49
  def autocorrect(node)
@@ -35,7 +35,11 @@ module RuboCop
35
35
 
36
36
  def on_send(node)
37
37
  before_or_after_all(node) do |hook|
38
- add_offense(node, :expression, format(MSG, hook: hook.source))
38
+ add_offense(
39
+ node,
40
+ location: :expression,
41
+ message: format(MSG, hook: hook.source)
42
+ )
39
43
  end
40
44
  end
41
45
  end
@@ -27,12 +27,12 @@ module RuboCop
27
27
  '`have_current_path` matcher on `page`'.freeze
28
28
 
29
29
  def_node_matcher :expectation_set_on_current_path, <<-PATTERN
30
- (send nil :expect (send {(send nil :page) nil} :current_path))
30
+ (send nil? :expect (send {(send nil? :page) nil?} :current_path))
31
31
  PATTERN
32
32
 
33
33
  def on_send(node)
34
34
  expectation_set_on_current_path(node) do
35
- add_offense(node, :selector)
35
+ add_offense(node, location: :selector)
36
36
  end
37
37
  end
38
38
  end
@@ -47,13 +47,17 @@ module RuboCop
47
47
 
48
48
  def_node_matcher :feature_method, <<-PATTERN
49
49
  (block
50
- $(send {(const nil :RSpec) nil} ${#{MAP.keys.map(&:inspect).join(' ')}} ...)
50
+ $(send {(const nil? :RSpec) nil?} ${#{MAP.keys.map(&:inspect).join(' ')}} ...)
51
51
  ...)
52
52
  PATTERN
53
53
 
54
54
  def on_block(node)
55
55
  feature_method(node) do |send_node, match|
56
- add_offense(send_node, :selector, format(MSG, MAP[match], match))
56
+ add_offense(
57
+ send_node,
58
+ location: :selector,
59
+ message: format(MSG, MAP[match], match)
60
+ )
57
61
  end
58
62
  end
59
63
 
@@ -23,11 +23,11 @@ module RuboCop
23
23
  'the class or module being tested.'.freeze
24
24
 
25
25
  def_node_matcher :valid_describe?, <<-PATTERN
26
- {(send {(const nil :RSpec) nil} :describe const ...) (send nil :describe)}
26
+ {(send {(const nil? :RSpec) nil?} :describe const ...) (send nil? :describe)}
27
27
  PATTERN
28
28
 
29
29
  def_node_matcher :describe_with_metadata, <<-PATTERN
30
- (send {(const nil :RSpec) nil} :describe
30
+ (send {(const nil? :RSpec) nil?} :describe
31
31
  !const
32
32
  ...
33
33
  (hash $...))
@@ -40,7 +40,7 @@ module RuboCop
40
40
  PATTERN
41
41
 
42
42
  def_node_matcher :shared_group?, <<-PATTERN
43
- (block (send {(const nil :RSpec) nil} #{SharedGroups::ALL.node_pattern_union} ...) ...)
43
+ (block (send {(const nil? :RSpec) nil?} #{SharedGroups::ALL.node_pattern_union} ...) ...)
44
44
  PATTERN
45
45
 
46
46
  def on_top_level_describe(node, args)
@@ -51,7 +51,7 @@ module RuboCop
51
51
  return if pairs.any?(&method(:rails_metadata?))
52
52
  end
53
53
 
54
- add_offense(args.first, :expression)
54
+ add_offense(args.first, location: :expression)
55
55
  end
56
56
  end
57
57
  end
@@ -29,7 +29,7 @@ module RuboCop
29
29
  return unless second_arg && second_arg.str_type?
30
30
  return if METHOD_STRING_MATCHER =~ one(second_arg.children)
31
31
 
32
- add_offense(second_arg, :expression)
32
+ add_offense(second_arg, location: :expression)
33
33
  end
34
34
  end
35
35
  end
@@ -21,11 +21,13 @@ module RuboCop
21
21
  MSG = 'Avoid describing symbols.'.freeze
22
22
 
23
23
  def_node_matcher :describe_symbol?, <<-PATTERN
24
- (send {(const nil :RSpec) nil} :describe $sym ...)
24
+ (send {(const nil? :RSpec) nil?} :describe $sym ...)
25
25
  PATTERN
26
26
 
27
27
  def on_send(node)
28
- describe_symbol?(node) { |match| add_offense(match, :expression) }
28
+ describe_symbol?(node) do |match|
29
+ add_offense(match, location: :expression)
30
+ end
29
31
  end
30
32
  end
31
33
  end
@@ -40,7 +40,7 @@ module RuboCop
40
40
  MSG = 'Use `%s` instead of `%s`.'.freeze
41
41
 
42
42
  def_node_matcher :common_instance_exec_closure?, <<-PATTERN
43
- (block (send (const nil {:Class :Module}) :new ...) ...)
43
+ (block (send (const nil? {:Class :Module}) :new ...) ...)
44
44
  PATTERN
45
45
 
46
46
  def_node_matcher :rspec_block?,
@@ -57,7 +57,11 @@ module RuboCop
57
57
  @described_class = described_class
58
58
 
59
59
  find_usage(body) do |match|
60
- add_offense(match, :expression, message(match.const_name))
60
+ add_offense(
61
+ match,
62
+ location: :expression,
63
+ message: message(match.const_name)
64
+ )
61
65
  end
62
66
  end
63
67
 
@@ -70,7 +70,7 @@ module RuboCop
70
70
  def on_block(node)
71
71
  return unless example_group?(node) && !contains_example?(node)
72
72
 
73
- add_offense(node.children.first, :expression)
73
+ add_offense(node.children.first, location: :expression)
74
74
  end
75
75
 
76
76
  private
@@ -23,20 +23,18 @@ module RuboCop
23
23
  class EmptyLineAfterFinalLet < Cop
24
24
  MSG = 'Add an empty line after the last `let` block.'.freeze
25
25
 
26
- def_node_matcher :let?, '(block $(send nil {:let :let!} ...) args ...)'
26
+ def_node_matcher :let?, '(block $(send nil? {:let :let!} ...) args ...)'
27
27
 
28
28
  def on_block(node)
29
- return unless let?(node) && !in_spec_block?(node)
29
+ return unless example_group_with_body?(node)
30
30
 
31
- latest_let = node
32
- node.parent.each_child_node do |sibling|
33
- latest_let = sibling if let?(sibling)
34
- end
31
+ latest_let = node.body.child_nodes.select { |child| let?(child) }.last
35
32
 
36
- return if latest_let.equal?(node.parent.children.last)
33
+ return if latest_let.nil?
34
+ return if latest_let.equal?(node.body.children.last)
37
35
 
38
36
  no_new_line_after(latest_let) do
39
- add_offense(latest_let, :expression)
37
+ add_offense(latest_let, location: :expression)
40
38
  end
41
39
  end
42
40
 
@@ -68,12 +66,6 @@ module RuboCop
68
66
 
69
67
  node.each_child_node { |child| heredoc_line(child, &block) }
70
68
  end
71
-
72
- def in_spec_block?(node)
73
- node.each_ancestor(:block).any? do |ancestor|
74
- Examples::ALL.include?(ancestor.method_name)
75
- end
76
- end
77
69
  end
78
70
  end
79
71
  end
@@ -17,7 +17,7 @@ module RuboCop
17
17
  class EmptyLineAfterSubject < Cop
18
18
  MSG = 'Add empty line after `subject`.'.freeze
19
19
 
20
- def_node_matcher :subject?, '(block $(send nil :subject ...) args ...)'
20
+ def_node_matcher :subject?, '(block $(send nil? :subject ...) args ...)'
21
21
 
22
22
  def on_block(node)
23
23
  return unless subject?(node) && !in_spec_block?(node)
@@ -27,7 +27,7 @@ module RuboCop
27
27
  next_line = processed_source[send_line]
28
28
  return if next_line.blank?
29
29
 
30
- add_offense(node, :expression, MSG)
30
+ add_offense(node, location: :expression, message: MSG)
31
31
  end
32
32
 
33
33
  def autocorrect(node)
@@ -37,7 +37,7 @@ module RuboCop
37
37
 
38
38
  return unless length > max_length
39
39
 
40
- add_offense(node, :expression, message(length))
40
+ add_offense(node, location: :expression, message: message(length))
41
41
  end
42
42
 
43
43
  private
@@ -67,7 +67,7 @@ module RuboCop
67
67
  expr.end_pos - 1
68
68
  )
69
69
 
70
- add_offense(docstring, docstring, message)
70
+ add_offense(docstring, location: docstring, message: message)
71
71
  end
72
72
 
73
73
  def replacement_text(range)
@@ -45,7 +45,7 @@ module RuboCop
45
45
 
46
46
  def on_send(node)
47
47
  expect_literal(node) do |argument|
48
- add_offense(argument, :expression)
48
+ add_offense(argument, location: :expression)
49
49
  end
50
50
  end
51
51
 
@@ -25,7 +25,7 @@ module RuboCop
25
25
  HOOKS = Hooks::ALL.node_pattern_union.freeze
26
26
 
27
27
  def_node_matcher :hook, <<-PATTERN
28
- (block (send _ $#{HOOKS} ...) _ $!nil)
28
+ (block (send _ $#{HOOKS} ...) _ $!nil?)
29
29
  PATTERN
30
30
 
31
31
  def_node_search :expect, <<-PATTERN
@@ -39,8 +39,8 @@ module RuboCop
39
39
  hook(node) do |hook_name, body|
40
40
  expect(body) do |expect|
41
41
  method = send_node(expect)
42
- add_offense(method, :selector,
43
- message(method, hook_name))
42
+ add_offense(method, location: :selector,
43
+ message: message(method, hook_name))
44
44
  end
45
45
  end
46
46
  end
@@ -27,7 +27,7 @@ module RuboCop
27
27
  name = variable_name[1..-1]
28
28
  return unless name.eql?('stdout') || name.eql?('stderr')
29
29
 
30
- add_offense(node, :name, format(MSG, name: name))
30
+ add_offense(node, location: :name, message: format(MSG, name: name))
31
31
  end
32
32
 
33
33
  private
@@ -31,18 +31,18 @@ module RuboCop
31
31
  MSG = 'Use a block to set a dynamic value to an attribute.'.freeze
32
32
 
33
33
  def_node_matcher :dynamic_defined_statically?, <<-PATTERN
34
- (send nil _ (send ... ))
34
+ (send nil? _ (send ... ))
35
35
  PATTERN
36
36
 
37
37
  def_node_search :factory_attributes, <<-PATTERN
38
- (block (send nil {:factory :trait} ...) _ { (begin $...) $(send ...) } )
38
+ (block (send nil? {:factory :trait} ...) _ { (begin $...) $(send ...) } )
39
39
  PATTERN
40
40
 
41
41
  def on_block(node)
42
42
  return if node.method_name == :trait
43
43
  factory_attributes(node).to_a.flatten.each do |attribute|
44
44
  if dynamic_defined_statically?(attribute)
45
- add_offense(attribute, :expression)
45
+ add_offense(attribute, location: :expression)
46
46
  end
47
47
  end
48
48
  end
@@ -57,7 +57,7 @@ module RuboCop
57
57
 
58
58
  return if filename_ends_with?(glob)
59
59
 
60
- add_offense(node, :expression, format(MSG, glob))
60
+ add_offense(node, location: :expression, message: format(MSG, glob))
61
61
  end
62
62
 
63
63
  private
@@ -36,15 +36,15 @@ module RuboCop
36
36
  FOCUS_TRUE = s(:pair, FOCUS_SYMBOL, s(:true))
37
37
 
38
38
  def_node_matcher :metadata, <<-PATTERN
39
- {(send nil #{FOCUSABLE_SELECTORS} ... (hash $...))
40
- (send nil #{FOCUSABLE_SELECTORS} $...)}
39
+ {(send nil? #{FOCUSABLE_SELECTORS} ... (hash $...))
40
+ (send nil? #{FOCUSABLE_SELECTORS} $...)}
41
41
  PATTERN
42
42
 
43
43
  def_node_matcher :focused_block?, focused.send_pattern
44
44
 
45
45
  def on_send(node)
46
46
  focus_metadata(node) do |focus|
47
- add_offense(focus, :expression)
47
+ add_offense(focus, location: :expression)
48
48
  end
49
49
  end
50
50
 
@@ -77,7 +77,11 @@ module RuboCop
77
77
  return check_implicit(method_send) unless scope_name
78
78
 
79
79
  style_detected(scope_name)
80
- add_offense(method_send, :expression, explicit_message(scope_name))
80
+ add_offense(
81
+ method_send,
82
+ location: :expression,
83
+ message: explicit_message(scope_name)
84
+ )
81
85
  end
82
86
  end
83
87
 
@@ -95,7 +99,11 @@ module RuboCop
95
99
  style_detected(:implicit)
96
100
  return if implicit_style?
97
101
 
98
- add_offense(method_send, :selector, format(EXPLICIT_MSG, style))
102
+ add_offense(
103
+ method_send,
104
+ location: :selector,
105
+ message: format(EXPLICIT_MSG, style)
106
+ )
99
107
  end
100
108
 
101
109
  def explicit_message(scope)
@@ -31,8 +31,8 @@ module RuboCop
31
31
 
32
32
  def_node_matcher :implicit_expect, <<-PATTERN
33
33
  {
34
- (send nil ${:should :should_not} ...)
35
- (send (send nil $:is_expected) {:to :to_not :not_to} ...)
34
+ (send nil? ${:should :should_not} ...)
35
+ (send (send nil? $:is_expected) {:to :to_not :not_to} ...)
36
36
  }
37
37
  PATTERN
38
38
 
@@ -44,7 +44,7 @@ module RuboCop
44
44
 
45
45
  ENFORCED_REPLACEMENTS = alternatives.merge(alternatives.invert).freeze
46
46
 
47
- def on_send(node)
47
+ def on_send(node) # rubocop:disable Metrics/MethodLength
48
48
  return unless (source_range = offending_expect(node))
49
49
 
50
50
  expectation_source = source_range.source
@@ -54,7 +54,11 @@ module RuboCop
54
54
  else
55
55
  opposite_style_detected
56
56
 
57
- add_offense(node, source_range, offense_message(expectation_source))
57
+ add_offense(
58
+ node,
59
+ location: source_range,
60
+ message: offense_message(expectation_source)
61
+ )
58
62
  end
59
63
  end
60
64
 
@@ -24,20 +24,20 @@ module RuboCop
24
24
 
25
25
  EXAMPLES = Examples::ALL.node_pattern_union.freeze
26
26
 
27
- def_node_matcher :example?, "(block $(send nil #{EXAMPLES}) ...)"
27
+ def_node_matcher :example?, "(block $(send nil? #{EXAMPLES}) ...)"
28
28
 
29
29
  def_node_search :null_double, <<-PATTERN
30
30
  (lvasgn $_
31
31
  (send
32
- $(send nil :instance_double
32
+ $(send nil? :instance_double
33
33
  ...) :as_null_object))
34
34
  PATTERN
35
35
 
36
36
  def_node_search :have_received_usage, <<-PATTERN
37
37
  (send
38
- (send nil :expect
38
+ (send nil? :expect
39
39
  (lvar $_)) :to
40
- (send nil :have_received
40
+ (send nil? :have_received
41
41
  ...)
42
42
  ...)
43
43
  PATTERN
@@ -47,7 +47,7 @@ module RuboCop
47
47
 
48
48
  null_double(node) do |var, receiver|
49
49
  have_received_usage(node) do |expected|
50
- add_offense(receiver, :expression) if expected == var
50
+ add_offense(receiver, location: :expression) if expected == var
51
51
  end
52
52
  end
53
53
  end
@@ -63,7 +63,7 @@ module RuboCop
63
63
  ivar_usage(node) do |ivar, name|
64
64
  return if assignment_only? && !ivar_assigned?(node, name)
65
65
 
66
- add_offense(ivar, :expression)
66
+ add_offense(ivar, location: :expression)
67
67
  end
68
68
  end
69
69
 
@@ -17,12 +17,12 @@ module RuboCop
17
17
  MSG = 'Omit `?` from `%<matcher>s`.'.freeze
18
18
 
19
19
  def_node_matcher :invalid_predicate_matcher?, <<-PATTERN
20
- (send (send nil :expect ...) {:to :not_to :to_not} $(send nil #predicate?))
20
+ (send (send nil? :expect ...) {:to :not_to :to_not} $(send nil? #predicate?))
21
21
  PATTERN
22
22
 
23
23
  def on_send(node)
24
24
  invalid_predicate_matcher?(node) do |predicate|
25
- add_offense(predicate, :expression)
25
+ add_offense(predicate, location: :expression)
26
26
  end
27
27
  end
28
28
 
@@ -28,7 +28,7 @@ module RuboCop
28
28
 
29
29
  def on_send(node)
30
30
  example_inclusion_offense(node, alternative_style) do
31
- add_offense(node, :expression)
31
+ add_offense(node, location: :expression)
32
32
  end
33
33
  end
34
34
 
@@ -26,13 +26,13 @@ module RuboCop
26
26
  PATTERN
27
27
 
28
28
  def_node_matcher :expectation?, <<-PATTERN
29
- (send (send nil :expect (lvar %)) :to ...)
29
+ (send (send nil? :expect (lvar %)) :to ...)
30
30
  PATTERN
31
31
 
32
32
  def on_block(node)
33
33
  each?(node) do |arg, body|
34
34
  if single_expectation?(body, arg) || only_expectations?(body, arg)
35
- add_offense(node.children.first, :expression)
35
+ add_offense(node.children.first, location: :expression)
36
36
  end
37
37
  end
38
38
  end
@@ -29,7 +29,7 @@ module RuboCop
29
29
  class LeadingSubject < Cop
30
30
  MSG = 'Declare `subject` above any other `let` declarations.'.freeze
31
31
 
32
- def_node_matcher :subject?, '(block $(send nil :subject ...) args ...)'
32
+ def_node_matcher :subject?, '(block $(send nil? :subject ...) args ...)'
33
33
 
34
34
  def on_block(node)
35
35
  return unless subject?(node) && !in_spec_block?(node)
@@ -37,7 +37,7 @@ module RuboCop
37
37
  node.parent.each_child_node do |sibling|
38
38
  break if sibling.equal?(node)
39
39
 
40
- break add_offense(node, :expression) if let?(sibling)
40
+ break add_offense(node, location: :expression) if let?(sibling)
41
41
  end
42
42
  end
43
43
 
@@ -33,7 +33,7 @@ module RuboCop
33
33
  class LetBeforeExamples < Cop
34
34
  MSG = 'Move `let` before the examples in the group.'.freeze
35
35
 
36
- def_node_matcher :let?, '(block (send nil {:let :let!} ...) ...)'
36
+ def_node_matcher :let?, '(block (send nil? {:let :let!} ...) ...)'
37
37
  def_node_matcher :example_or_group?, <<-PATTERN
38
38
  {
39
39
  #{(Examples::ALL + ExampleGroups::ALL).block_pattern}
@@ -58,7 +58,7 @@ module RuboCop
58
58
 
59
59
  node.each_child_node do |child|
60
60
  if let?(child)
61
- add_offense(child, :expression) if example_found
61
+ add_offense(child, location: :expression) if example_found
62
62
  elsif example_or_group?(child)
63
63
  example_found = true
64
64
  end
@@ -30,15 +30,17 @@ module RuboCop
30
30
 
31
31
  MSG = 'Do not use `let!` for test setup.'.freeze
32
32
 
33
- def_node_search :let_bang, '(block $(send nil :let! (sym $_)) args ...)'
33
+ def_node_search :let_bang, <<-PATTERN
34
+ (block $(send nil? :let! (sym $_)) args ...)
35
+ PATTERN
34
36
 
35
- def_node_search :method_called?, '(send nil %)'
37
+ def_node_search :method_called?, '(send nil? %)'
36
38
 
37
39
  def on_block(node)
38
40
  return unless example_group?(node)
39
41
 
40
42
  unused_let_bang(node) do |let|
41
- add_offense(let, :expression)
43
+ add_offense(let, location: :expression)
42
44
  end
43
45
  end
44
46
 
@@ -17,7 +17,7 @@ module RuboCop
17
17
  def_node_matcher :message_chain, Matchers::MESSAGE_CHAIN.send_pattern
18
18
 
19
19
  def on_send(node)
20
- message_chain(node) { add_offense(node, :selector) }
20
+ message_chain(node) { add_offense(node, location: :selector) }
21
21
  end
22
22
 
23
23
  def message(node)
@@ -32,16 +32,16 @@ module RuboCop
32
32
  SUPPORTED_STYLES = %w[allow expect].freeze
33
33
 
34
34
  def_node_matcher :message_expectation, <<-PATTERN
35
- (send $(send nil {:expect :allow} ...) :to #receive_message?)
35
+ (send $(send nil? {:expect :allow} ...) :to #receive_message?)
36
36
  PATTERN
37
37
 
38
- def_node_search :receive_message?, '(send nil :receive ...)'
38
+ def_node_search :receive_message?, '(send nil? :receive ...)'
39
39
 
40
40
  def on_send(node)
41
41
  message_expectation(node) do |match|
42
42
  return correct_style_detected if preferred_style?(match)
43
43
 
44
- add_offense(match, :selector, MSG % style) do
44
+ add_offense(match, location: :selector, message: MSG % style) do
45
45
  opposite_style_detected
46
46
  end
47
47
  end
@@ -37,20 +37,22 @@ module RuboCop
37
37
  SUPPORTED_STYLES = %w[have_received receive].freeze
38
38
 
39
39
  def_node_matcher :message_expectation, %(
40
- (send (send nil :expect $_) {:to :to_not :not_to} ...)
40
+ (send (send nil? :expect $_) {:to :to_not :not_to} ...)
41
41
  )
42
42
 
43
43
  def_node_search :receive_message, %(
44
- $(send nil {:receive :have_received} ...)
44
+ $(send nil? {:receive :have_received} ...)
45
45
  )
46
46
 
47
47
  def on_send(node)
48
48
  receive_message_matcher(node) do |receiver, message_matcher|
49
49
  return correct_style_detected if preferred_style?(message_matcher)
50
50
 
51
- add_offense(message_matcher, :selector, error_message(receiver)) do
52
- opposite_style_detected
53
- end
51
+ add_offense(
52
+ message_matcher,
53
+ location: :selector,
54
+ message: error_message(receiver)
55
+ ) { opposite_style_detected }
54
56
  end
55
57
  end
56
58
 
@@ -32,7 +32,7 @@ module RuboCop
32
32
  return if single_top_level_describe?
33
33
  return unless top_level_nodes.first.equal?(node)
34
34
 
35
- add_offense(node, :expression)
35
+ add_offense(node, location: :expression)
36
36
  end
37
37
  end
38
38
  end
@@ -99,8 +99,12 @@ module RuboCop
99
99
 
100
100
  add_offense(
101
101
  method,
102
- :expression,
103
- format(MSG, total: expectation_count, max: max_expectations)
102
+ location: :expression,
103
+ message: format(
104
+ MSG,
105
+ total: expectation_count,
106
+ max: max_expectations
107
+ )
104
108
  )
105
109
  end
106
110
 
@@ -37,7 +37,7 @@ module RuboCop
37
37
  MSG = 'Do not set more than one subject per example group'.freeze
38
38
 
39
39
  def_node_matcher :named_subject?, <<-PATTERN
40
- (block (send nil :subject $sym) args ...)
40
+ (block (send nil? :subject $sym) args ...)
41
41
  PATTERN
42
42
 
43
43
  def on_block(node)
@@ -46,7 +46,7 @@ module RuboCop
46
46
  subjects = RuboCop::RSpec::ExampleGroup.new(node).subjects
47
47
 
48
48
  subjects[0...-1].each do |subject|
49
- add_offense(subject, :expression)
49
+ add_offense(subject, location: :expression)
50
50
  end
51
51
  end
52
52
 
@@ -48,13 +48,13 @@ module RuboCop
48
48
  }
49
49
  PATTERN
50
50
 
51
- def_node_matcher :unnamed_subject, '$(send nil :subject)'
51
+ def_node_matcher :unnamed_subject, '$(send nil? :subject)'
52
52
 
53
53
  def on_block(node)
54
54
  return unless rspec_block?(node)
55
55
 
56
56
  subject_usage(node) do |subject_node|
57
- add_offense(subject_node, :selector)
57
+ add_offense(subject_node, location: :selector)
58
58
  end
59
59
  end
60
60
 
@@ -99,7 +99,11 @@ module RuboCop
99
99
 
100
100
  def on_top_level_describe(node, _)
101
101
  find_nested_contexts(node.parent) do |context, nesting|
102
- add_offense(context.children.first, :expression, message(nesting))
102
+ add_offense(
103
+ context.children.first,
104
+ location: :expression,
105
+ message: message(nesting)
106
+ )
103
107
  end
104
108
  end
105
109
 
@@ -22,7 +22,7 @@ module RuboCop
22
22
 
23
23
  def on_send(node)
24
24
  not_to_not_offense(node, alternative_style) do
25
- add_offense(node, :expression)
25
+ add_offense(node, location: :expression)
26
26
  end
27
27
  end
28
28
 
@@ -25,7 +25,7 @@ module RuboCop
25
25
  MSG = '`%<name>s` is already defined.'.freeze
26
26
 
27
27
  def_node_matcher :setup?, <<-PATTERN
28
- (block (send nil {:let :let! :subject} (sym $_)) ...)
28
+ (block (send nil? {:let :let! :subject} (sym $_)) ...)
29
29
  PATTERN
30
30
 
31
31
  def on_block(node)
@@ -34,7 +34,11 @@ module RuboCop
34
34
  _describe, _args, body = *node
35
35
 
36
36
  find_duplicates(body) do |duplicate, name|
37
- add_offense(duplicate, :expression, format(MSG, name: name))
37
+ add_offense(
38
+ duplicate,
39
+ location: :expression,
40
+ message: format(MSG, name: name)
41
+ )
38
42
  end
39
43
  end
40
44
 
@@ -12,25 +12,29 @@ module RuboCop
12
12
 
13
13
  def check_inflected(node)
14
14
  predicate_in_actual?(node) do |predicate|
15
- add_offense(node, node.loc.expression, message_inflected(predicate))
15
+ add_offense(
16
+ node,
17
+ location: :expression,
18
+ message: message_inflected(predicate)
19
+ )
16
20
  end
17
21
  end
18
22
 
19
23
  def_node_matcher :predicate_in_actual?, <<-PATTERN
20
24
  (send
21
- (send nil :expect {
22
- (block $(send !nil #predicate? ...) ...)
23
- $(send !nil #predicate? ...)})
25
+ (send nil? :expect {
26
+ (block $(send !nil? #predicate? ...) ...)
27
+ $(send !nil? #predicate? ...)})
24
28
  ${:to :not_to :to_not}
25
29
  $#boolean_matcher?)
26
30
  PATTERN
27
31
 
28
32
  def_node_matcher :be_bool?, <<-PATTERN
29
- (send nil {:be :eq :eql :equal} {true false})
33
+ (send nil? {:be :eq :eql :equal} {true false})
30
34
  PATTERN
31
35
 
32
36
  def_node_matcher :be_boolthy?, <<-PATTERN
33
- (send nil {:be_truthy :be_falsey :be_falsy :a_truthy_value :a_falsey_value :a_falsy_value})
37
+ (send nil? {:be_truthy :be_falsey :be_falsy :a_truthy_value :a_falsey_value :a_falsy_value})
34
38
  PATTERN
35
39
 
36
40
  def boolean_matcher?(node)
@@ -130,33 +134,41 @@ module RuboCop
130
134
 
131
135
  private
132
136
 
133
- def check_explicit(node)
137
+ def check_explicit(node) # rubocop:disable Metrics/MethodLength
134
138
  predicate_matcher_block?(node) do |_actual, matcher|
135
- add_offense(node, :expression, message_explicit(matcher))
139
+ add_offense(
140
+ node,
141
+ location: :expression,
142
+ message: message_explicit(matcher)
143
+ )
136
144
  ignore_node(node.children.first)
137
145
  return
138
146
  end
139
147
 
140
148
  return if part_of_ignored_node?(node)
141
149
  predicate_matcher?(node) do |_actual, matcher|
142
- add_offense(node, :expression, message_explicit(matcher))
150
+ add_offense(
151
+ node,
152
+ location: :expression,
153
+ message: message_explicit(matcher)
154
+ )
143
155
  end
144
156
  end
145
157
 
146
158
  def_node_matcher :predicate_matcher?, <<-PATTERN
147
159
  (send
148
- (send nil :expect $!nil)
160
+ (send nil? :expect $!nil?)
149
161
  {:to :not_to :to_not}
150
- {$(send nil #predicate_matcher_name? ...)
151
- (block $(send nil #predicate_matcher_name? ...) ...)})
162
+ {$(send nil? #predicate_matcher_name? ...)
163
+ (block $(send nil? #predicate_matcher_name? ...) ...)})
152
164
  PATTERN
153
165
 
154
166
  def_node_matcher :predicate_matcher_block?, <<-PATTERN
155
167
  (block
156
168
  (send
157
- (send nil :expect $!nil)
169
+ (send nil? :expect $!nil?)
158
170
  {:to :not_to :to_not}
159
- $(send nil #predicate_matcher_name?))
171
+ $(send nil? #predicate_matcher_name?))
160
172
  ...)
161
173
  PATTERN
162
174
 
@@ -34,7 +34,7 @@ module RuboCop
34
34
  return unless example_group?(node)
35
35
 
36
36
  repeated_descriptions(node).each do |repeated_description|
37
- add_offense(repeated_description, :expression)
37
+ add_offense(repeated_description, location: :expression)
38
38
  end
39
39
  end
40
40
 
@@ -20,7 +20,7 @@ module RuboCop
20
20
  return unless example_group?(node)
21
21
 
22
22
  repeated_examples(node).each do |repeated_example|
23
- add_offense(repeated_example, :expression)
23
+ add_offense(repeated_example, location: :expression)
24
24
  end
25
25
  end
26
26
 
@@ -11,7 +11,7 @@ module RuboCop
11
11
  #
12
12
  # This cop can be configured using the `EnforcedStyle` option
13
13
  #
14
- # @example `EncorcedStyle: block`
14
+ # @example `EnforcedStyle: block`
15
15
  # # bad
16
16
  # allow(Foo).to receive(:bar).and_return("baz")
17
17
  # expect(Foo).to receive(:bar).and_return("baz")
@@ -22,7 +22,7 @@ module RuboCop
22
22
  # # also good as the returned value is dynamic
23
23
  # allow(Foo).to receive(:bar).and_return(bar.baz)
24
24
  #
25
- # @example `EncorcedStyle: and_return`
25
+ # @example `EnforcedStyle: and_return`
26
26
  # # bad
27
27
  # allow(Foo).to receive(:bar) { "baz" }
28
28
  # expect(Foo).to receive(:bar) { "baz" }
@@ -41,7 +41,7 @@ module RuboCop
41
41
 
42
42
  def_node_matcher :and_return_value, <<-PATTERN
43
43
  (send
44
- (send nil :receive (...)) :and_return $(...)
44
+ (send nil? :receive (...)) :and_return $(...)
45
45
  )
46
46
  PATTERN
47
47
 
@@ -57,7 +57,13 @@ module RuboCop
57
57
 
58
58
  def check_and_return_call(node)
59
59
  and_return_value(node) do |args|
60
- add_offense(node, :expression, MSG_BLOCK) unless dynamic?(args)
60
+ unless dynamic?(args)
61
+ add_offense(
62
+ node,
63
+ location: :expression,
64
+ message: MSG_BLOCK
65
+ )
66
+ end
61
67
  end
62
68
  end
63
69
 
@@ -66,7 +72,13 @@ module RuboCop
66
72
  return unless block
67
73
 
68
74
  _receiver, _args, body = *block
69
- add_offense(node, :expression, MSG_AND_RETURN) unless dynamic?(body)
75
+ unless dynamic?(body) # rubocop:disable Style/GuardClause
76
+ add_offense(
77
+ node,
78
+ location: :expression,
79
+ message: MSG_AND_RETURN
80
+ )
81
+ end
70
82
  end
71
83
 
72
84
  def dynamic?(node)
@@ -29,7 +29,7 @@ module RuboCop
29
29
  class ScatteredLet < Cop
30
30
  MSG = 'Group all let/let! blocks in the example group together.'.freeze
31
31
 
32
- def_node_matcher :let?, '(block (send nil {:let :let!} ...) ...)'
32
+ def_node_matcher :let?, '(block (send nil? {:let :let!} ...) ...)'
33
33
 
34
34
  def on_block(node)
35
35
  return unless example_group_with_body?(node)
@@ -45,7 +45,7 @@ module RuboCop
45
45
 
46
46
  node.each_child_node do |child|
47
47
  if let?(child)
48
- add_offense(child, :expression) if mix_found
48
+ add_offense(child, location: :expression) if mix_found
49
49
  let_found = true
50
50
  elsif let_found
51
51
  mix_found = true
@@ -29,7 +29,7 @@ module RuboCop
29
29
  return unless example_group?(node)
30
30
 
31
31
  analyzable_hooks(node).each do |repeated_hook|
32
- add_offense(repeated_hook, :expression)
32
+ add_offense(repeated_hook, location: :expression)
33
33
  end
34
34
  end
35
35
 
@@ -99,7 +99,11 @@ module RuboCop
99
99
  end
100
100
 
101
101
  def add_shared_item_offense(node, message)
102
- add_offense(node.children.first, :expression, message)
102
+ add_offense(
103
+ node.children.first,
104
+ location: :expression,
105
+ message: message
106
+ )
103
107
  end
104
108
  end
105
109
  end
@@ -30,7 +30,7 @@ module RuboCop
30
30
 
31
31
  return if arg.hash_type? && !single_key_hash?(arg)
32
32
 
33
- add_offense(node, :selector)
33
+ add_offense(node, location: :selector)
34
34
  end
35
35
  end
36
36
 
@@ -40,8 +40,8 @@ module RuboCop
40
40
  # @yield [Symbol] subject name
41
41
  def_node_matcher :subject, <<-PATTERN
42
42
  {
43
- (block (send nil :subject (sym $_)) args ...)
44
- (block (send nil $:subject) args ...)
43
+ (block (send nil? :subject (sym $_)) args ...)
44
+ (block (send nil? $:subject) args ...)
45
45
  }
46
46
  PATTERN
47
47
 
@@ -57,17 +57,19 @@ module RuboCop
57
57
  # expect(foo).to receive(:bar).with(1).and_return(2)
58
58
  def_node_matcher :message_expectation?, <<-PATTERN
59
59
  {
60
- (send nil :allow (send nil %))
61
- (send (send nil :expect (send nil %)) :to #receive_message?)
60
+ (send nil? :allow (send nil? %))
61
+ (send (send nil? :expect (send nil? %)) :to #receive_message?)
62
62
  }
63
63
  PATTERN
64
64
 
65
- def_node_search :receive_message?, '(send nil :receive ...)'
65
+ def_node_search :receive_message?, '(send nil? :receive ...)'
66
66
 
67
67
  def on_block(node)
68
68
  return unless example_group?(node)
69
69
 
70
- find_subject_stub(node) { |stub| add_offense(stub, :expression) }
70
+ find_subject_stub(node) do |stub|
71
+ add_offense(stub, location: :expression)
72
+ end
71
73
  end
72
74
 
73
75
  private
@@ -21,14 +21,14 @@ module RuboCop
21
21
  MSG = 'Prefer using verifying doubles over normal doubles.'.freeze
22
22
 
23
23
  def_node_matcher :unverified_double, <<-PATTERN
24
- {(send nil {:double :spy} $_ ...) }
24
+ {(send nil? {:double :spy} $_ ...) }
25
25
  PATTERN
26
26
 
27
27
  def on_send(node)
28
28
  unverified_double(node) do |name|
29
29
  return if name.sym_type? && cop_config['IgnoreSymbolicNames']
30
30
 
31
- add_offense(node, :expression)
31
+ add_offense(node, location: :expression)
32
32
  end
33
33
  end
34
34
  end
@@ -16,7 +16,7 @@ module RuboCop
16
16
  'Chain the methods or remove it.'.freeze
17
17
 
18
18
  def_node_matcher :expect?, <<-PATTERN
19
- (send nil :expect ...)
19
+ (send nil? :expect ...)
20
20
  PATTERN
21
21
 
22
22
  def_node_matcher :expect_block?, <<-PATTERN
@@ -37,7 +37,7 @@ module RuboCop
37
37
 
38
38
  def check_expect(node)
39
39
  return unless void?(node)
40
- add_offense(node, :expression)
40
+ add_offense(node, location: :expression)
41
41
  end
42
42
 
43
43
  def void?(expect)
@@ -18,7 +18,7 @@ module RuboCop
18
18
  #
19
19
  # Detect if node is `before`, `after`, `around`
20
20
  def_node_matcher :hook, <<-PATTERN
21
- (block {$(send nil #{Hooks::ALL.node_pattern_union} ...)} ...)
21
+ (block {$(send nil? #{Hooks::ALL.node_pattern_union} ...)} ...)
22
22
  PATTERN
23
23
 
24
24
  def_node_matcher :subject, Subject::ALL.block_pattern
@@ -10,7 +10,7 @@ module RuboCop
10
10
  def_node_matcher :example_group?, ExampleGroups::ALL.block_pattern
11
11
 
12
12
  def_node_matcher :example_group_with_body?, <<-PATTERN
13
- (block #{ExampleGroups::ALL.send_pattern} args [!nil])
13
+ (block #{ExampleGroups::ALL.send_pattern} args [!nil?])
14
14
  PATTERN
15
15
 
16
16
  def_node_matcher :example?, Examples::ALL.block_pattern
@@ -4,7 +4,7 @@ module RuboCop
4
4
  module RSpec
5
5
  # Version information for the RSpec RuboCop plugin.
6
6
  module Version
7
- STRING = '1.18.0'.freeze
7
+ STRING = '1.19.0'.freeze
8
8
  end
9
9
  end
10
10
  end
@@ -32,7 +32,7 @@ Gem::Specification.new do |spec|
32
32
  spec.test_files = spec.files.grep(%r{^spec/})
33
33
  spec.extra_rdoc_files = ['MIT-LICENSE.md', 'README.md']
34
34
 
35
- spec.add_runtime_dependency 'rubocop', '>= 0.50.0'
35
+ spec.add_runtime_dependency 'rubocop', '>= 0.51.0'
36
36
 
37
37
  spec.add_development_dependency 'rake'
38
38
  spec.add_development_dependency 'rspec', '>= 3.4'
@@ -28,7 +28,7 @@ RSpec.describe RuboCop::Cop::RSpec::Cop do
28
28
  end
29
29
 
30
30
  def on_send(node)
31
- add_offense(node, :expression, 'I flag everything')
31
+ add_offense(node, location: :expression, message: 'I flag everything')
32
32
  end
33
33
  end
34
34
  RuboCop::RSpec::FakeCop
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-rspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.18.0
4
+ version: 1.19.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Backus
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2017-09-29 00:00:00.000000000 Z
13
+ date: 2017-10-19 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rubocop
@@ -18,14 +18,14 @@ dependencies:
18
18
  requirements:
19
19
  - - ">="
20
20
  - !ruby/object:Gem::Version
21
- version: 0.50.0
21
+ version: 0.51.0
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - ">="
27
27
  - !ruby/object:Gem::Version
28
- version: 0.50.0
28
+ version: 0.51.0
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: rake
31
31
  requirement: !ruby/object:Gem::Requirement