lib/rspec/sorbet/doubles.rb in rspec-sorbet-1.9.0 vs lib/rspec/sorbet/doubles.rb in rspec-sorbet-1.9.1
- old
+ new
@@ -21,10 +21,10 @@
alias_method :allow_instance_doubles!, :allow_doubles!
private
INLINE_DOUBLE_REGEX =
- /T.(?:let|cast): Expected type (?:T.(?<t_method>any|nilable|class_of)\()?(?<expected_types>[a-zA-Z0-9:: ,]*)(\))?, got (?:type .* with value )?#<(?<double_type>Instance|Class|Object)?Double([\(]|[ ])(?<doubled_type>[a-zA-Z0-9:: ,]*)(\))?/.freeze
+ /T.(?:let|cast): Expected type (?:T.(?<t_method>any|nilable|class_of)\()*(?<expected_types>[a-zA-Z0-9:: ,]*)(\))*, got (?:type .* with value )?#<(?<double_type>Instance|Class|Object)?Double([\(]|[ ])(?<doubled_type>[a-zA-Z0-9:: ,]*)(\))?/.freeze
def handle_call_validation_error(signature, opts)
raise TypeError, opts[:pretty_message] unless @existing_handler