Created
May 7, 2010 16:32
-
-
Save jaimeiniesta/393679 to your computer and use it in GitHub Desktop.
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
| feature "Articles", %q{ | |
| In order to manage articles | |
| As an editor | |
| I want to create, list, show, edit, update and destroy articles | |
| } do | |
| background do | |
| Article.create(:title => 'First article', :body => 'My first article') | |
| Article.create(:title => 'Second article', :body => 'My second article') | |
| Article.create(:title => 'Third article', :body => 'My third article') | |
| end | |
| scenario "Should list articles" do | |
| visit articles | |
| Article.find(:all).each do |article| | |
| page.should have_css(".article_title", :title => article.title) | |
| end | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment