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

- old
+ new

@@ -30,20 +30,23 @@ 'Capybara feature specs - instead, use the ' \ '`have_current_path` matcher on `page`' RESTRICT_ON_SEND = %i[expect].freeze + # @!method expectation_set_on_current_path(node) 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') + # @!method as_is_matcher(node) def_node_matcher :as_is_matcher, <<-PATTERN (send #expectation_set_on_current_path $#Runners.all ${(send nil? :eq ...) (send nil? :match (regexp ...))}) PATTERN + # @!method regexp_str_matcher(node) def_node_matcher :regexp_str_matcher, <<-PATTERN (send #expectation_set_on_current_path $#Runners.all $(send nil? :match (str $_))) PATTERN