T S Vallender


I'm not a fan of most of RSpec's DSL, so appreciated this article from Test Double suggesting the use of Ruby 3's endless method syntax instead of using let.

def foo = bar.new
instead of
let foo { bar.new }

Not considered that before, and combined with using instance variables instead of let!, it reinforces and makes more obvious the difference.
Just learned RSpec has an :aggregate_failures option, to show all failures in specs with multiple assertions.
Added a helper script to a project that uses RSpec to replicate the default behaviour of Rails segregation of system tests and get faster feedback more easily.
RSpec has a --bisect option which attempts to automatically find the smallest combination of specs causing a failure (use in conjunction with --seed).