Allan Espinosa

Mimic rspec's "context" in minitest/spec

2014 January 18

I like spec-style tests as you can describe the scenarios of a test in a more structured manner.  However, I love the xUnit family’s assertion calls.  Here’s a small helper to create the describe => context synonym:

def context(*args, &block)
  describe(*args, &block)
end