title: Capybara, using expect inside within
body: <p>I am working with Capybara right now and I have a issue I was not able to resolve:
  I am logging into a page and I want to check, whether the login was successful. So I have the following code:</p>
  
  <pre><code>    within(:id,'user_dropdown') do
          expect(find('.name')).to have_content 'test'
      end
  </code></pre>
  
  <p>But with doing this, I get the following error:</p>
  
  <pre><code>undefined method `expect' for #&lt;Object:0x007fc39328ab78&gt;
  </code></pre>
  
  <p>I think it has something to do, that expect is not available in the scope inside within. But how can I do this else?</p>
  
  <p>Already thank you!</p>