Skip to content

Commit

Permalink
Fix autocorrect
Browse files Browse the repository at this point in the history
Autocorrecting was changed in RuboCop v0.31:
rubocop/rubocop#1833
  • Loading branch information
bquorning committed Jul 26, 2015
1 parent f378ffd commit c2b3497
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/rubocop/cop/rspec/described_class.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def on_block(node)
end

def autocorrect(node)
@corrections << lambda do |corrector|
lambda do |corrector|
corrector.replace(node.loc.expression, 'described_class')
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/rubocop/cop/rspec/example_wording.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def on_block(node) # rubocop:disable Metrics/AbcSize
end

def autocorrect(range)
@corrections << lambda do |corrector|
lambda do |corrector|
corrector.replace(range, corrected_message(range))
end
end
Expand Down
2 changes: 1 addition & 1 deletion rubocop-rspec.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Gem::Specification.new do |spec|
spec.test_files = spec.files.grep(/^spec\//)
spec.extra_rdoc_files = ['MIT-LICENSE.md', 'README.md']

spec.add_development_dependency('rubocop', '~> 0.24')
spec.add_development_dependency('rubocop', '~> 0.31')
spec.add_development_dependency('rake', '~> 10.1')
spec.add_development_dependency('rspec', '~> 3.0')
spec.add_development_dependency('simplecov', '~> 0.8')
Expand Down

0 comments on commit c2b3497

Please sign in to comment.