lib/rubocop/cop/rspec/message_expectation.rb in rubocop-rspec-2.1.0 vs lib/rubocop/cop/rspec/message_expectation.rb in rubocop-rspec-2.2.0
- old
+ new
@@ -28,9 +28,10 @@
include ConfigurableEnforcedStyle
MSG = 'Prefer `%<style>s` for setting message expectations.'
SUPPORTED_STYLES = %w[allow expect].freeze
+ RESTRICT_ON_SEND = %i[to].freeze
def_node_matcher :message_expectation, <<-PATTERN
(send $(send nil? {:expect :allow} ...) :to #receive_message?)
PATTERN