title: What is this notation in rspec: it { is_expected.to ... }
body: <p>I am reading the <a href="http://betterspecs.org/#describe" rel="noreferrer">'Better specs'</a> page, and in one of the examples it says:</p>
  
  <pre><code>context 'when logged in' do
    it { is_expected.to respond_with 200 }
  end
  context 'when logged out' do
    it { is_expected.to respond_with 401 }
  end
  </code></pre>
  
  <p>And I don't recognize this. I usually would do:</p>
  
  <pre><code>context 'when logged out' do
    it 'responds with a 401' do
      expect(response).to eq(401)
    end
  end
  </code></pre>
  
  <p>What is that syntax?</p>