lib/rubocop/cop/rspec/receive_messages.rb in rubocop-rspec-2.23.0 vs lib/rubocop/cop/rspec/receive_messages.rb in rubocop-rspec-2.23.1
- old
+ new
@@ -3,9 +3,14 @@
module RuboCop
module Cop
module RSpec
# Checks for multiple messages stubbed on the same object.
#
+ # @safety
+ # The autocorrection is marked as unsafe, because it may change the
+ # order of stubs. This in turn may cause e.g. variables to be called
+ # before they are defined.
+ #
# @example
# # bad
# before do
# allow(Service).to receive(:foo).and_return(bar)
# allow(Service).to receive(:baz).and_return(qux)