Skip to content

Instantly share code, notes, and snippets.

@chintanparikh
Created June 5, 2012 07:00
Show Gist options
  • Save chintanparikh/2873198 to your computer and use it in GitHub Desktop.
Save chintanparikh/2873198 to your computer and use it in GitHub Desktop.
Feature: Editing Posts
In order to be able to edit posts
As a user
I want to be able to do this via an interface
Background:
Given there is a post called "Hello, world"
When I follow "Hello, world"
Scenario: Editing a new post
And I follow "Edit"
And I fill in "Title" with "Hello, world edit"
And I fill in "Content" with "Hello world! This is a blog post that has been edited"
And I press "Submit"
Then I should see "Blog post has been edited"
Scenario: Editing a post with invalid attributes should fail
And I follow "Edit"
And I fill in "Title" with ""
And I fill in "Content" with ""
And I press "Submit"
Then I should see "Blog post has not been edited"
And I should see "Title can't be blank"
And I should see "Content can't be blank"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment