Skip to content

Instantly share code, notes, and snippets.

@jaimeiniesta
Created May 7, 2010 16:32
Show Gist options
  • Select an option

  • Save jaimeiniesta/393679 to your computer and use it in GitHub Desktop.

Select an option

Save jaimeiniesta/393679 to your computer and use it in GitHub Desktop.
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