As many of you already know, let has been a great improvement on declaring instance variables in our before :each blocks. Lazy loading on when it’s used while being kept in memory for the duration of the test. One way in which we use lets, for more complicated variable definitions, is to use let, and provide it with arguments using a lambda:

1 2 3 4 5 let ( :user ) { -> ( name , email ) { double ( "user" , user : email , email : email ) } }

You can then easily setup users in your test: