How to communicate between processes in Ruby with sockets

Interprocess communication in Ruby can use UNIX sockets for parent-child coordination, parallel test synchronization, and waiting for child cleanup after fork.

Selenium: Network throttling via Chromedriver

Throttle headless Chrome network conditions in Selenium to debug flaky integration tests and simulate slow page loads.

Test meta-refresh redirects with Cucumber

Capybara step for asserting a meta refresh redirect in the page head during Cucumber feature tests.

Using Spring and parallel_tests in your Rails application

Spring keeps bin/rails and bin/rspec fast, while parallel_tests can break shared test runs unless Spring is disabled in parallel contexts.

Cucumber Webrat steps

Custom Cucumber step definitions for checking fields, HTML content, regex matches, and table data in Webrat-based tests.

Undefined method log for Selenium::WebDriver::Remote::W3C::Bridge

Integration tests can fail with undefined method log on Selenium::WebDriver::Remote::W3C::Bridge after enabling Selenium W3C mode; upgrading Capybara restores browser log access.

Cucumber / Selenium: Access and test document title

Verify that page titles contain expected text during browser tests with Selenium and Cucumber, avoiding mismatches in document title assertions.

Hide your Selenium browser window with a VNC server

Run Selenium tests in a hidden X session with vncserver, keeping the browser accessible for inspection without adding a gem.

Geordi 1.0 released

Geordi 1.0 consolidates Rails project commands into a single CLI with command lookup, dependencies, and new setup, update, console, shell, and test workflows.

Don't call #node on a Capybara element

Capybara elements become driver-specific when #node is used, breaking code that should work across Rack::Test and Selenium. Prefer the driver-neutral Capybara API for searches and interactions.

Things to consider when using Travis CI

Fragile CI builds on Travis often fail with Ruby 1.8.7, incompatible Rubygems, or debugger gems in the test bundle.

Manually requiring your application's models will lead to trouble

Manually requiring Rails models can load classes twice and trigger duplicate validations or other subtle test failures. Let Rails autoload models or require them by the same path Rails uses.

Defining and calling lambdas or procs (Ruby)

Ruby Proc objects can behave as strict lambdas or flexible blocks, affecting argument handling and return behavior when code is wrapped as callable objects.

Test the status code of a response in Cucumber

Checking response status in Cucumber can verify error handling and redirects during acceptance tests. Webrat and Capybara expose status information for custom step definitions.

Deal with certain travis CI failures

Travis CI builds can break after Ubuntu image changes, causing PostgreSQL, MySQL, and Rails test failures. Pinning dist: trusty keeps the older environment until the setup is updated.

Test downstream bandwidth of Internet connection

Check whether an internet uplink can sustain 1GE or 10GE throughput by pushing traffic internally or from many public mirrors.

Rails: Fixing ETags that never match

Rails default ETags often never repeat because rotating CSRF tokens and CSP nonces change response bytes, blocking cache hits and 304 responses.

How to change the hostname in Cucumber features

Capybara defaults to www.example.com, which can hide hostname-specific behavior in feature tests. Stubbing app_host lets scenarios run against a chosen host without leaking into others.

Test that a number or money amount is shown with Cucumber

Reliable Cucumber checks for displayed numbers and monetary amounts prevent false positives from partial matches and accept spaces or nonbreaking spaces before units.

Best practices: Large data migrations from legacy systems

Large legacy data migrations need deep source-system understanding, fast failure, dedicated logging, and traceable migration metadata to keep long-running imports debuggable and verifiable.

parallel_tests: Disable parallel run for tagged scenarios

Tag specific Cucumber scenarios so they avoid running together when they contend for a shared resource or browser focus, at the cost of slower tests.

Cucumber: How to avoid VCR errors for unused requests in pending tests

Pending Cucumber steps can fail when VCR cassettes contain unused HTTP interactions; @allow_unused_http_interactions can be enabled only for pending features.

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.

Claude Code Sandbox

Code execution in Claude Code can be isolated to reduce permission prompts and limit file and network access, but it is not a security boundary.