Skip to content

Instantly share code, notes, and snippets.

@naganowl
Created May 26, 2016 22:14
Show Gist options
  • Save naganowl/61410c1ef16b7d394c2603465ced9e31 to your computer and use it in GitHub Desktop.
Save naganowl/61410c1ef16b7d394c2603465ced9e31 to your computer and use it in GitHub Desktop.
Precedence order of RSpec 2.99 tests
  • let is lazy, runs when it's invoked
  • let! are not lazy, runs immediately when the block is executed
  • before blocks are also not lazy, has same precedence as let!

For let! and before blocks, they execute based off source code order since it has the same precedence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment