rspec-tips

Here are a few tips for rspec that I have collected.

  • use the let block
  • avoid explict subject
  • use factory girl or some other object factory
  • keep your tests fast with judicius mocking
  • use a second test suit for integration tests
  • use contexts and describe blocks liberally
  • one expectation per it block