Created
January 9, 2012 18:40
-
-
Save steveklabnik/1584277 to your computer and use it in GitHub Desktop.
I think this spec implies that I should commit myself into some kind of rehab.
This file contains hidden or 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
| it "lists them in reverse chronological order" do | |
| recent_titles = Article.for_dashboard.map(&:title).map{|t| Regexp.quote(t) } | |
| title_regex = Regexp.new(recent_titles.join(".*?"), Regexp::MULTILINE) | |
| page.html.should match(title_regex) | |
| end |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ahhh, that's much nicer. Thanks so much!!!