Write resilient tests with matchers that take other matchers | Everyday Rails

I recently needed to update some old RSpec tests that use VCR fixtures in a Rails application. VCR is a wonderful tool for recording transactions with external HTTP services. It can help make your tests faster by bypassing the potential slowness and flakiness of external services on every run. Instead, it saves a fixture of the HTTP transaction(s) made when the test is run, then uses that fixture for future runs of the test.But over time, there’s risk in the fixtures getting stale. The best way I’ve found to check for fixture staleness is to delete the fixture (a “cassette” in VCR parlance) and re-record.
Write resilient tests with matchers that take other matchers | Everyday Rails #ruby #rubydeveloper #rubyonrails #tests https://rubyonrails.ba/single/write-resilient-tests-with-matchers-that-take-other-matchers-everyday-rails

Nezir Zahirovic

Contractor Ruby On Rails (8+ years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles