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.

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.

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.

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.

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.

Spreewald 4.3.3 released

Built-in support for Rails and Bootstrap error classes reduces step overrides, while configurable error classes, XPath selectors, and optional negation improve flexibility.

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.

Use CSS attribute selectors with Capybara

Quoted CSS attribute selectors let Capybara check meta tags reliably; unquoted values can trigger Nokogiri CSS syntax errors.

Setting nil values in Machinist blueprints

Blueprint attributes in Machinist can keep inherited values unless nil is wrapped in a block; editor { nil } clears the master value, plain nil does not.

Customize path for Capybara "show me the page" files

Capybara's save_and_open_page files can clutter the Rails root when debugging Cucumber scenarios. Set Capybara.save_and_open_page_path to store them elsewhere.

One-liner syntax in RSpec's should-based and expect-based syntaxes

RSpec one-liners can assert expectations on subject with implicit example descriptions, using should or is_expected in expect-based syntax.