Created
August 13, 2010 01:40
-
-
Save bernerdschaefer/522094 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 "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