lib/rubocop/cop/rspec/capybara/current_path_expectation.rb in rubocop-rspec-2.1.0 vs lib/rubocop/cop/rspec/capybara/current_path_expectation.rb in rubocop-rspec-2.2.0

- old
+ new

@@ -28,9 +28,11 @@ MSG = 'Do not set an RSpec expectation on `current_path` in ' \ 'Capybara feature specs - instead, use the ' \ '`have_current_path` matcher on `page`' + RESTRICT_ON_SEND = %i[expect].freeze + def_node_matcher :expectation_set_on_current_path, <<-PATTERN (send nil? :expect (send {(send nil? :page) nil?} :current_path)) PATTERN # Supported matchers: eq(...) / match(/regexp/) / match('regexp')