lib/rubocop/minitest/assert_offense.rb in rubocop-minitest-0.19.1 vs lib/rubocop/minitest/assert_offense.rb in rubocop-minitest-0.20.0
- old
+ new
@@ -53,11 +53,11 @@
# companion method `assert_no_offenses`. This method is a much
# simpler assertion since it just inspects the source and checks
# that there were no offenses. The `assert_offense` method has
# to do more work by parsing out lines that contain carets.
#
- # If the code produces an offense that could not be auto-corrected, you can
+ # If the code produces an offense that could not be autocorrected, you can
# use `assert_no_corrections` after `assert_offense`.
#
# @example `assert_offense` and `assert_no_corrections`
#
# assert_offense(<<~RUBY)
@@ -91,11 +91,11 @@
end
def assert_offense(source, file = nil)
setup_assertion
- @cop.instance_variable_get(:@options)[:auto_correct] = true
+ @cop.instance_variable_get(:@options)[:autocorrect] = true
expected_annotations = RuboCop::RSpec::ExpectOffense::AnnotatedSource.parse(source)
if expected_annotations.plain_source == source
raise 'Use `assert_no_offenses` to assert that no offenses are found'
end
@@ -174,10 +174,10 @@
RuboCop::ProcessedSource.new(source, ruby_version, file)
end
def ruby_version
- 2.5
+ 2.6
end
end
end
end