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

lostisland / faraday / #4765
96%
master: 92%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 26 Nov 2026 05:01PM UTC
Jobs 1
Files 35
Run time 1min
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

26 Nov 2026 05:01PM UTC coverage: 96.581% (+0.02%) from 96.563%
#4765

push

web-flow
Match stub headers case-insensitively in strict mode (#1745)

* Match stub headers case-insensitively in strict mode

HTTP header names are case-insensitive, and Utils::Headers treats them
that way, but the strict mode comparison built a Set of the header hash
and so compared the names as spelled. A stub written with 'Content-Type'
did not match a request whose middleware set 'content-type', and a stub
written with the symbol :"Content-Type" matched neither, because
Utils::Headers normalizes a symbol to 'Content-type'.

Compare lowercased names and leave the values case-sensitive.

Fixes #1488.

* fix: match JSON-encoded bodies in test stubs, compare headers in Utils::Headers

The issue's own steps still raised Stubs::NotFound after the header fix:
with `request(:json)` the adapter receives the body as the JSON string
"{}", while the stub body is the Hash {}, so they never compared equal.
A Hash or Array stub body now also matches a String request body whose
decoded JSON equals it.

Header-name case folding moves from a helper in the test adapter to
Utils::Headers#equivalent?, next to the rest of the class's
case-insensitive lookups, and is documented with YARD.

Adds specs for a symbol stub header with a dash, for Hash stub bodies,
and for the issue's setup end to end through the JSON middleware, and
documents both behaviours in docs/adapters/test-adapter.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Matt <iMacTia@users.noreply.github.com>

10 of 10 new or added lines in 2 files covered. (100.0%)

1723 of 1784 relevant lines covered (96.58%)

154.69 hits per line

Jobs
ID Job ID Ran Files Coverage
1 #4765.1 26 Nov 2026 05:01PM UTC 35
96.58
Source Files on build #4765
  • Tree
  • List 35
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • dc025658 on github
  • Prev Build on main
  • Next Build on main
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc