RSpec: How to compare ISO 8601 time strings with milliseconds
Rails JSON serializes times with milliseconds, so iso8601 and to_json can differ in RSpec expectations. Using to_json keeps time string comparisons matching.
Perform Sidekiq jobs immediately in development
Run Sidekiq jobs synchronously in development to avoid a separate worker process and benefit from code reloading.
Always show the page if there is an error in Cucumber
Cucumber failures can open the current page in a browser automatically, avoiding repeated "Then show me the page" reruns and speeding up debugging.
RSpec 2.6 supports "any_instance" now
any_instance stubbing and expectations now work in RSpec 2.6, enabling should_receive and stub on instances created inside code.
Nested Spreewald patiently blocks are now patient
Nested patiently blocks now wait independently in Spreewald, preventing detached DOM failures when with_scope reuses cached elements.
Cucumber step to manually trigger javascript events in Selenium scenarios (using jQuery)
Selenium can miss browser events such as change during form input; a Cucumber step can fire jQuery-registered events manually with execute_script.
Machinist blueprints: Do not set associations without blocks
Association values in Machinist blueprints need blocks so Project.make runs per blueprint instance, not once at parse time when RSpec loads.
Using RSpec's late resolving of "let" variables for cleaner specs
Lazy let evaluation keeps RSpec examples shorter when a setup call has many required arguments, and lets stubs change the result before the value is used.
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.
Do not use "find" on Capybara nodes from an array
Capybara find can return incorrect matches when called on nodes from all, especially with text filters. Use a full selector on the page to scope the search reliably.
RSpec and Cucumber: Shorthand syntax to run multiple line numbers in the same file
Run multiple example or scenario line numbers from one file with rspec or cucumber, using colon-separated targets instead of separate commands.
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.
An auto-mapper for BEM classes in Cucumber selectors
BEM-style selectors can be generated from plain-language Cucumber locators, reducing repetitive typing when mapping readable step text to CSS classes.
How to use triple quotes inside a Cucumber docstring
Cucumber docstrings break when nested triple double quotes appear inside the text; escaping or a Transform can preserve embedded quote markers.
Cucumber factory 1.10.0 released
Cucumber factory now infers the model class from the factory, so steps can use natural names like admin instead of user (admin).
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.
Spreewald: Click on an element with a CSS selector
Clicking elements by raw CSS selector is brittle; selector_for lets feature steps use plain English names like sidebar instead.
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.
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.
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.
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.