6 Commits

Author SHA1 Message Date
Geoff Hubbard
e342992751 chore: Rubocop lint Style/MissingRespondToMissing (#930) 2019-03-04 23:25:25 +01:00
Geoff Hubbard
dbba0734d6 Fix test order dependency in default_connection proxy test (#929)
* Fix the default_connection proxy test

The assignment to the mock connection:

`Faraday.default_connection = mock_connection`

was persisting throughout the tests.

If the random number generator is unlucky the following error occurs:

\#<Double "Connection"> was originally created in one example but has leaked into another example and can no longer be used.  rspec-mocks' doubles are designed to only last for one example, and you need to create a new one in each example you wish to use it for.

This commit fixes the issue by explicitly setting the default_connection
back to nil in an "after" block after the tests have run.

Subsequent calls to `default_connection` within the test suite then
behave as previously expected irrespective of the random test ordering.
2019-03-04 23:16:10 +01:00
Geoff Hubbard
c5ceb2679c chore: RuboCop lint Style/MethodMissingSuper (#928) 2019-03-04 21:07:33 +00:00
James Herdman
dc4d8f620e [RuboCop] Trailing Blank Lines Violations (#872) 2019-02-25 22:53:32 +01:00
Mattia
b427091f0e chore: RuboCop: Support Frozen String Literals (#868) 2019-02-24 20:35:12 +01:00
Mattia
f1b2657523
Feature/#762 rspec (#832) 2018-11-26 17:11:35 +00:00