You don't always need a custom matcher to write clean RSpec tests

Repeated RSpec assertions can be extracted into custom matchers, but some cases are better served by private helper methods when reuse would be too awkward.

Rails: Your index actions probably want strict_loading

Strict loading in index actions catches N+1 queries when views touch unpreloaded associations, causing test failures instead of hidden database hits.

Chromedriver: Connect local chromedriver with docker

Remote Chrome debugging in Docker is awkward when integration tests need a browser you can inspect. SSH port forwarding can expose a local chromedriver inside the test container.

Rubymine: Configure CTRL + ALT + SHIFT + c to work with "Test Source Roots"

RubyMine test navigation depends on marking test folders as Test Sources Root; remapping CTRL + ALT + SHIFT + c can copy repository-relative paths like spec/foo_spec.rb instead of foo_spec.rb.

Install or update Chromedriver on Linux

Chromedriver on Linux often falls out of sync with Chrome, causing test failures. Official downloads, geordi chromedriver-update, or package-based installs can keep the driver current.

Disable PostgreSQL's Write-Ahead Log to speed up tests

Unlogged PostgreSQL tables can speed up Rails test suites by skipping the write-ahead log, but they raise crash-related data loss risk and stay unsuitable for production.

Small helper to conditionally re-record VCR cassettes

Conditional VCR cassette re-recording for RSpec specs avoids manual YAML deletion while iterating on failing tests.

Chrome: disable "Choose your search engine" popup in tests

Fresh Chrome installs in Europe can trigger a search-engine choice popup that breaks Cucumber tests; --disable-search-engine-choice-screen disables it.

Parallelize Development Using Git Worktrees

Use git worktree to keep multiple working trees on one repository, so you can test, compare versions, and switch branches without disturbing current work.

RSpec: How to write isolated specs with cookies

Cookie-dependent behavior in Rails specs is hard to test outside controller specs, especially signed and encrypted values. ActionDispatch::Cookies::CookieJar provides isolated access in request and helper specs.

How to make a cucumber test work with multiple browser sessions

Capybara multi-session tests support simultaneous users in browser-based chat flows, but session-aware authentication state is needed to avoid conflicts.

Order in which RSpec processes .rb files

RSpec file loading order affects test stability only when examples depend on global state; version defaults differ between alphabetical, disk, and random execution.

Jasmine: Use `throwUnless` for testing-library's `waitFor`

Flaky waitFor tests can fail when Jasmine expectations do not throw, preventing retries. throwUnless and throwUnlessAsync turn failed checks into exceptions for reliable waiting.

Automatic Log Rotation in Rails

Rails log files rotate automatically around 100 MB, and config.log_file_size lets you cap growth and keep logs manageable in development, test, or production.

Threads and processes in a Capybara/Selenium session

Capybara/Selenium tests involve a test process, a server thread and a browser process, so blocking, stale time, and uncommitted transactions can cause seemingly impossible failures.

How to enable Chromedriver logging

Chromedriver logging helps diagnose Selenium Chrome test failures by recording driver activity to a file or terminal. Service configuration or a manually started driver can enable verbose output.

An auto-mapper for ARIA labels and BEM classes in Cucumber selectors

Map readable Cucumber locators to CSS via BEM classes or aria-label, so integration tests target page elements without manual selector rules.

Capybara: Most okayest helper to download and inspect files

Reliable file-download testing in Capybara, including filename, content type, disposition, and text inspection across Selenium and Rack::Test without leaving the page.

Run all RSpec tests edited or added in the current branch

Run only edited or newly added RSpec files in the current branch by diffing against master, which speeds feedback on focused test changes.

Selenium: Fix Chrome's "Unsafe Password" Warning

Chrome password leak detection can interrupt Selenium runs with breach warnings on weak or reused credentials. Disabling profile.password_manager_leak_detection suppresses the dialog in automated tests.

How to fix parallel_tests with Redis on powerful machines

Parallel test runs can exceed Redis’s default 16 databases on multi-core machines, causing ERR DB index is out of range; increasing the database limit resolves it.

Cucumber step to set cookies in your Capybara session

Set browser cookies in Cucumber feature tests when you need to simulate visitors with existing cookie data across the full application stack.

Rails < 5: How to get after_commit callbacks fired in tests

Transactional test fixtures can suppress after_commit callbacks in Rails, preventing email jobs and other post-save work from running. Rails 5 fixes this; older versions can use test_after_commit.

Heads up: Capybara 3's text matchers no longer squish whitespace by default

Capybara 3 no longer squishes whitespace when matching text across elements, so tests that relied on rendered text comparison can fail unless normalization is enabled.