Read more

Match strings in a given order with Cucumber and Capybara

Dominik Schöler
October 08, 2010Software engineer at makandra GmbH

Sometimes the order in which strings appear on a page matters to you.

Illustration book lover

Growing Rails Applications in Practice

Check out our e-book. Learn to structure large Ruby on Rails codebases with the tools you already know and love.

  • Introduce design conventions for controllers and user-facing models
  • Create a system for growth
  • Build applications to last
Read more Show archive.org snapshot

Spreewald Show archive.org snapshot gives you steps like these:

Then I should see in this order:
  | Alpha Group |
  | Augsburg    |
  | Berlin      |
  | Beta Group  |

Or, if you prefer multiline strings:

Then I should see in this order:
  """
  Alpha Group
  Augsburg
  Berlin
  Beta Group
  """

The step ignores all HTML tags and only tests on plain text.

Posted by Dominik Schöler to makandra dev (2010-10-08 17:17)