From cdb7394583745f55ded011cef6b8c14e48ce2814 Mon Sep 17 00:00:00 2001 From: John Backus Date: Fri, 30 Dec 2016 04:54:03 -0500 Subject: [PATCH] Change MultipleExpectations to use 'Max' literal (#269) Previously, MultipleExpectations depended on ConfigurableMax defining the method `parameter_name`. This method name changed on the most recent (unreleased) version of rubocop and this broke the cop. Probably safer for us to rely on the literal until the public API for rubocop is clear --- lib/rubocop/cop/rspec/multiple_expectations.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rubocop/cop/rspec/multiple_expectations.rb b/lib/rubocop/cop/rspec/multiple_expectations.rb index 873b04221..e7ebc2bc8 100644 --- a/lib/rubocop/cop/rspec/multiple_expectations.rb +++ b/lib/rubocop/cop/rspec/multiple_expectations.rb @@ -77,7 +77,7 @@ def flag_example(node, expectation_count:) end def max_expectations - Integer(cop_config.fetch(parameter_name, 1)) + Integer(cop_config.fetch('Max', 1)) end end end