Cucumber: Detect if the current Capybara driver supports Javascript
Capybara.javascript_test? checks whether the current driver supports JavaScript, helping feature tests switch behavior for Selenium, capybara-webkit, Poltergeist, and custom drivers.
Update: Aggregated RSpec/Cucumber test coverage with RCov
Aggregated test coverage for RSpec and Cucumber with rcov:all now supports Rails 2 and 3 and can ignore shared traits.
Rails Env Widget
A small helper adds a dismissible on-screen badge showing the current Rails environment to prevent confusion between development, test, and production.
Why your Cucumber feature loses cookies when run under Selenium
Cucumber/Selenium tests can lose cookies and sessions when the app and browser run in different times, because old dates make cookies expire immediately.
Silencing Deprecation Warnings in Rspec
Deprecated Ruby tests can flood RSpec output with warning noise. A narrower way to quiet them avoids hiding warnings from dependencies.
makandra/capybara-lockstep
Flaky end-to-end tests often fail because Capybara outpaces client-side JavaScript and AJAX; synchronizing commands with browser activity makes full-stack integration suites more stable.
How to install the `xelatex` binary on Ubuntu 14.04
Missing xelatex causes RTeX::Document::ExecutableNotFoundError during tests; installing texlive-xetex on Ubuntu 14.04 provides the binary.
Insomnia helps you querying your API
GUI client for testing and communicating with APIs; a less cluttered alternative to Postman and cURL, available via snap or Ubuntu packages.
HTML: Making browsers wrap long words
Long words can overflow layouts when browsers wrap only at word boundaries. CSS hyphenation, soft hyphens, <wbr>, and overflow-wrap offer different control levels.
Skip Selenium scenarios in a Cucumber run
@javascript Cucumber scenarios run with Selenium and can slow down test runs; cucumber --tags ~@javascript skips them when needed.
RSpec: Inferring spec type from file location
RSpec Rails can infer spec behavior from file location, removing manual type tags and enabling request helpers like get and post where appropriate.
Upgrading Rails 2 from 2.3.8 through 2.3.18 to Rails LTS
Rails 2.3.x upgrades fix security vulnerabilities and API changes across patch levels, with extra CSRF, XSS, and JSON gem updates needed on some releases.
Parallel cucumber: How to pass in cucumber arguments
Pass Cucumber CLI flags such as --tags through parallel_cucumber by wrapping them in --cucumber-options when running test shards.
Test that a hash contains a partial hash with RSpec
Use hash_including in RSpec to verify a hash or method call contains only the expected key-value pairs without matching the full structure.
Turn off SSL for scenarios with Selenium
Selenium on WEBrick fails on HTTPS pages because the server does not speak SSL. Disabling SSL only for those scenarios avoids Cucumber browser test failures.
Selenium WebDriver 2.5.0, 2.6.0 fails when selecting options from select boxes
selenium-webdriver versions after 2.5.0 can make Capybara fail to choose <select> options even when the option is present, affecting Firefox tests.
RSpec: automatic creation of VCR cassettes
RSpec examples tagged :vcr automatically record and replay HTTP cassettes, while untagged specs block network calls unless HTTP access is explicitly enabled.
Fix: Capybara is very slow when filling out fields in large forms
Large forms can make Capybara input filling painfully slow because field lookup builds costly XPath queries. A custom fill_in patch can restore usable test speed.
Error "execution expired (Timeout::Error)" when using Selenium and Webmock
Bulk test runs can fail with execution expired (Timeout::Error) when Selenium and WebMock interact; upgrading WebMock to 1.7+ resolves the timeout issue.
Test that a form field has an error with Cucumber and Capybara
Capybara and Cucumber can assert field validation errors by checking for .field_with_errors around a named form field.
Issue Checklist Template
Personal issue workflow checklist for moving features from start to review, with branch, commit, merge request, testing, and staging handoff steps.
On Being A Journeyman Software Craftsman: Test-first and Test-driven conversation with JB Rainsberger
We had a conversation about the fact that the 'TDD is about testing vs TDD is about design" debate that keeps popping up, especially now in the Ruby community.
How to list updateable dependencies with Bundler and Yarn
List outdated gems and packages that can be upgraded, with filters for allowed versions and dependency groups to narrow bulk updates.
Type text into Javascript prompt dialogs in Capybara/Selenium
Automated tests need a way to enter text into JavaScript prompt dialogs in Capybara/Selenium. Browser dialog handling can block workflows unless the prompt input is filled correctly.