title: Is it possible to test the order of elements via RSpec/Capybara?
body: <p>I'm using RSpec/Capybara as my test suite. I have some javascript that dynamically appends <code>&lt;li&gt;</code> to the end of a <code>&lt;ul&gt;</code>. I want to write a request spec to ensure that this is happening. </p>
  
  <p>I tried using the <code>has_css</code> Capybara method and advanced CSS selectors to test for the ordering of the <code>&lt;li&gt;</code> elements, but Capybara doesn't support the <code>+</code> CSS selector.</p>
  
  <p>Example:</p>
  
  <pre><code>page.should have_css('li:contains("ITEM #1")')
  pseuo_add_new_li
  page.should have_css('li:contains("ITEM #1")+li:contains("ITEM #2")')
  </code></pre>
  
  <p>Does anyone know of another way to test for ordering?</p>