Skip to content

Instantly share code, notes, and snippets.

@bernerdschaefer
Created August 13, 2010 01:40
Show Gist options
  • Select an option

  • Save bernerdschaefer/522094 to your computer and use it in GitHub Desktop.

Select an option

Save bernerdschaefer/522094 to your computer and use it in GitHub Desktop.
Feature "User creates new pitch" do
Background do
Given "I am a normal user" do
sign_in
end
And "I visit the home page" do
visit home_path
end
end
Scenario "happy path" do
When "I go to the new pitch page" do
# session.visit "/pitches/new"
end
And "I fill in the title with 'Ruby and Unix'" do
# page.fill_in "Title", :with => "Ruby and Unix"
end
Then "I should see my new pitch" do
# page.should have_content("Ruby and Unix")
end
end
Scenario "omits required fields" do
When "I go to the new pitch page" do
# session.visit "/pitches/new"
end
And "I click sumbit" do
# click_button "submit"
end
Then "I should see warnings about my missing fields" do
# page.should have_content("Title is required")
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment