weighttp - a lightweight and simple webserver benchmarking tool

Threaded web server benchmark can exhaust application resources more effectively than ApacheBench or httperf; libev is required for installation.

RSpec example groups can be named using symbols

RSpec example groups and shared examples can use symbols as names, even though the official docs do not mention it.

Cucumber: Check if a select field contains a disabled option

Capybara and Cucumber can verify that a select box includes a disabled choice, using an XPath check on the matching option element.

CucumberFactory 1.11 lets you use FactoryGirl traits

CucumberFactory 1.11 adds support for FactoryGirl traits, letting Cucumber steps create records with named variations such as vintage and moody.

Cucumber Factory: How to assign polymorphic associations

Polymorphic associations in Cucumber Factory require named associations; indirect references like owner above fail when the target type is ambiguous.

Sync confidential files between unixes using cloud storage and encfs

Encrypted file sync across Unix machines keeps confidential documents in cloud storage while encfs protects the contents from the provider.

How to reset a Mock

Mock expectations in RSpec can linger across examples; resetting a proxy removes the configured doubles and returns the object to its original state.

Rspec: Complex argument expectations for should_receive

Tight should_receive(...).with(...) expectations on hashes are brittle and produce unreadable failures. Block-based argument checks keep RSpec assertions clearer and more flexible.

grosser/rspec-instafail

Gem for instantly showing failing specs while continuing to run the rest of the suite, instead of aborting on the first failure.

Make Makandra Consul work with RSpec 2.x and Rails 3.x

Using Consul’s authorization matcher with RSpec 2.x on Rails 3.x can fail because of version incompatibilities. Compatibility requires adapting the matcher setup.

Fix "private method `select' called for Capybara::Node::Element

Capybara and selenium-webdriver version mismatches can break element interaction with a private select method error. Aligning gem versions avoids the API incompatibility.

Webmock's hash_including doesn't parse query values to string

hash_including in WebMock v3.0.1 compares query values as strings, so integer expectations fail unless the request matcher uses '1' instead of 1.

Howto transfer a single mysql table between several deployment stages

Copy a single MySQL table between deployment stages by dumping it from one database and importing it into another; imports overwrite existing tables, not merge them.

Minimal JavaScript function to detect version of Internet Explorer or Edge

User-agent sniffing can still be necessary when Microsoft browsers need special handling. ieVersion() extracts Internet Explorer 10/11 and Edge version numbers, returning undefined for others.

Cucumber step to pick a datetime in Rails' horrible datetime_select

datetime_select creates a clumsy date and time chooser in Rails; a visual picker is usually better, but a Cucumber step can still drive it.

Debugging in Cucumber

Useful Cucumber steps help inspect a Capybara session by opening the current page in a browser or starting an interactive debugger.

How to make http/https requests yourself with nc/telnet/openssl

Send raw HTTP or HTTPS requests from the command line when curl is unavailable or unsuitable, using nc, telnet, or openssl s_client.

ActiveRecord: Query Attributes

attribute? often checks presence like attribute.present?, but numeric values and associations behave differently; 0 can be false for ActiveRecord query attributes.

How to fix failing controller specs 91% of the time

Controller specs can fail without reaching controller code when authentication is missing, no request is triggered, or views stay unrendered.

Geordi 2.7.0 released

Geordi 2.7.0 tightens command behavior: cucumber now fails early on @solo feature failures, and commit warns on empty commits while showing progress.

Sending raw JSON data to a member action in a controller spec

Rails 4 controller specs can send raw JSON in a member action request by passing the JSON body before the route parameters.

Fix warning "already initialized constant Mocha" with Rails 3.2

Version mismatches between Mocha and Rails 3.2 can trigger an already initialized constant warning; updating Mocha and using a matching Rails version avoids it.

grosser/rspec-instafail

Immediate feedback for failing RSpec examples while passing ones continue to appear as green dots. Uses rspec/instafail with RSpec::Instafail formatting.

rspec_candy 0.4.0 released

rspec_candy 0.4.0 adds support for RSpec 3 and Rails 4, while dropping the unmaintained state_machine integration.