Steven's articles

  1. A Lite Spec Helper for Faster Rails Tests

    The Root of Slow Tests in Rails Running tests in Rails is usually slow and the slowness often originates from the very first line of most spec files – require ‘spec_helper.rb’. Take a typical spec_helper.rb for example (from gitlab): A simple examination of this file reveals its heavy load duties: – The whole Rails environment […]

  2. Value Objects Explained with Ruby

    This article explains the concept of value objects. It first defines and demonstrates various kinds of value objects, then it explains the rule to construct valid ones while covering the consequences of violating the concept. At last, it shows several ways to implement value objects in Ruby. Although the examples are written in Ruby, the […]