• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

lostisland / faraday / 2255
92%

Build:
DEFAULT BRANCH: master
Ran 04 Mar 2019 10:19PM UTC
Jobs 5
Files 40
Run time 5min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
2255

push

travis-ci

olleolleolle
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.

1611 of 1723 relevant lines covered (93.5%)

4447.72 hits per line

Jobs
ID Job ID Ran Files Coverage
2 2255.2 (2.3) 04 Mar 2019 10:19PM UTC 0
93.62
Travis Job 2255.2
3 2255.3 (2.4) 04 Mar 2019 10:19PM UTC 0
93.62
Travis Job 2255.3
4 2255.4 (2.5) 04 Mar 2019 10:19PM UTC 0
93.61
Travis Job 2255.4
5 2255.5 (ruby-head) 04 Mar 2019 10:21PM UTC 0
93.47
Travis Job 2255.5
6 2255.6 (2.6) 04 Mar 2019 10:23PM UTC 0
93.47
Travis Job 2255.6
Source Files on build 2255
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #2255
  • dbba0734 on github
  • Prev Build on master (#2254)
  • Next Build on master (#2259)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc