title: RSpec: What is the difference between let and a before block?
body: <p>What is difference between <code>let</code> and a <code>before</code> block in RSpec?</p>
  
  <p>And when to use each? </p>
  
  <p>What will be good approach (let or before) in below example?</p>
  
  <pre><code>let(:user) { User.make !}
  let(:account) {user.account.make!}
  
  before(:each) do
   @user = User.make!
   @account = @user.account.make!
  end
  </code></pre>
  
  <p>I studied this <a href="https://stackoverflow.com/questions/5359558/when-to-use-rspec-let">stackoverflow post</a></p>
  
  <p>But is it good to define let for association stuff like above?</p>