-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
I want to use request_to matcher without with option. But I've occurred following error:
Failure/Error:
expect { api_request }.not_to request_to(:post, 'https://example.com/api')
NoMethodError:
undefined method `[]' for nil:NilClass
# /usr/local/bundle/ruby/2.7.0/gems/my_api_client-0.17.0/lib/my_api_client/rspec/matchers/request_to.rb:11:in `block (2 levels) in <top (required)>'
The stack trace shows code that:
my_api_client/lib/my_api_client/rspec/matchers/request_to.rb
Lines 8 to 14 in 3266c99
| match do |api_request| | |
| disable_logging | |
| @expected = { | |
| request_line: request_line(expected_method, expected_url, expected_options[:query]), | |
| body: expected_options[:body], | |
| headers: expected_options[:headers], | |
| }.compact |
Metadata
Metadata
Assignees
Labels
No labels