Last active
December 16, 2015 10:19
-
-
Save bmarcot/5419334 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Then /I should see "(.*)" before "(.*)"/ do |e1, e2| | |
# ensure that that e1 occurs before e2. | |
# page.body is the entire content of the page as a string. | |
assert page.body.index(e1) < page.body.index(e2) | |
end | |
Then /I should see "(.*)" before "(.*)"/ do |e1, e2| | |
# another strategy with regex (see Hints part of the assignments) | |
page.body.scan(/.*"#{e1}".*"#{e2}".*/).length.should == 1 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment