title: When to use curly braces vs parenthesis in expect Rspec method?
body: <p>I had a test that did this:</p>
  
  <pre><code>expect(@parser.parse('adsadasdas')).to raise_error(Errno::ENOENT)
  </code></pre>
  
  <p>and it didn't work.  I changed to:</p>
  
  <pre><code>expect { @parser.parse('adsadasdas') }.to raise_error(Errno::ENOENT)
  </code></pre>
  
  <p>And it worked.</p>
  
  <p>When do we use curly braces and when do we use parentheses with expect?</p>