Use a special version of Chrome for selenium (and another for your everyday work)
Use a separate Chrome build for Selenium tests by pointing Selenium::WebDriver::Chrome.path at a binary from an environment variable, while keeping your normal browser untouched.
Delete all MySQL records while keeping the database schema
Clear MySQL data without dropping tables, useful after bad migrations or frozen tests. DatabaseCleaner truncation keeps the schema intact and can be wrapped in a Rake task.
New Firefox and gem versions for our Selenium testing environment (Ubuntu 14.04+)
Firefox 5.0.1 no longer runs on Ubuntu 14.04, so Selenium test setups need browser and gem updates to keep Rails 2.3 and Cucumber projects working.
Testing setTimeout and setInterval with Jasmine
jasmine.clock() lets tests fast-forward timers and trigger setTimeout or setInterval callbacks without waiting in real time.
Testing shared traits or modules without repeating yourself
Shared behavior in traits or modules can be tested once with RSpec shared example groups instead of duplicating specs for each class.
Capybara 2.0 has been released
Capybara 2.0 breaks compatibility with 1.x and drops Ruby 1.8 support. It changes Rails integration test conventions, element matching, and RSpec syntax.
Mocking time in Jasmine specs
Control time in Jasmine tests with the built-in jasmine.clock() to fake timers and new Date() without adding SinonJS.
Ruby 1.9 or Ruby 2.0 do not allow using shortcut blocks for private methods
&:test works for private methods in Ruby 1.8 but raises NoMethodError in Ruby 1.9 and 2.0.
Claude Code Sandbox
Claude Code can isolate shell commands from your files and network, reducing permission prompts and limiting damage from mistakes while still requiring careful trust.
SearchableTrait is now a gem: Dusen
SearchableTrait was extracted into the Dusen gem, adding tests, documentation, and a cleaner query syntax for Googlesque searches in models.
Downgrade Firefox 6 to Firefox 5 on Ubuntu
Firefox regression can break Selenium tests after an upgrade; running an older browser is unsupported and may leave the system unstable.
Ruby: How to use prepend for cleaner monkey patches
prepend makes Ruby monkey patches cleaner by inserting an extension before the original implementation, so super still reaches it and ancestor chains stay readable.
Test xpath expressions in your browser
Test XPath queries directly in the browser console to inspect page elements without extra tools; Safari, Chrome, and Firefox support this in different ways.
Sending errors to sentry from development
Enable Sentry reporting in development to verify setup changes, using Raven and temporary test messages while avoiding committed debugging noise.
Geordi 1.5.1 released
Geordi 1.5.1 adds smarter command handling for test selection, stage lookup, server ports, and LAN access, plus a firefox --setup version check fix.
Test whether Perfect Forward Secrecy (PFS) is enabled on a server (using OpenSSL)
openssl s_client can verify whether a server supports Perfect Forward Secrecy by checking if a cipher handshake succeeds or fails.
Migrating to Spreewald
Migrating an existing cucumber test suite to Spreewald reduces custom step definitions by replacing web, email, shared, and table steps with built-in support.
VCR and the webdrivers gem
VCR can complain when webdrivers checks the internet for driver updates during tests. Updating locally, ignoring the update host, or pinning the driver version avoids the noise.
Upgrading Ruby from 1.8.7 to 2.3.5
Ruby 2.3.5 migration from 1.8.7 needs gem updates, syntax fixes, and test adjustments to resolve compatibility errors across Rails apps.
Pattern: Disabling a certain feature in tests
Integration tests often break on cookie banners or captchas. A test-only switch disables them by default while allowing targeted reactivation for specific cases.
How to send a test e-mail from shell
Manually verify outbound e-mail delivery from a machine with mail from the shell, either empty or with a typed message body.
Gemspecs must not list the same gem as both runtime and development dependency
Duplicating a gem in both runtime and development dependencies breaks gemspec validation and can make Bundler ignore the package. Put test-only version pins in the Gemfile instead.
How to look at hidden X screens
Hidden X displays can be inspected by taking a screenshot of the active display, including Xvfb-backed sessions used for headless tests.
natritmeyer/site_prism
SitePrism adds a semantic Page Object Model DSL for Capybara acceptance tests, making site interfaces easier to model and query with reusable page and section objects.