Skip to content

Instantly share code, notes, and snippets.

@braidn
Created February 27, 2012 18:03
Show Gist options
  • Save braidn/1925883 to your computer and use it in GitHub Desktop.
Save braidn/1925883 to your computer and use it in GitHub Desktop.
Rails 3 in Action Cucumber issues
Background:
Given I am on the root_path
When I follow "New Project"
Scenario: creating a project
And I fill in "Name" with "Textmate 2"
And I press "Create Project"
Then I should see "Project has been created"
And I should be on the project page for "Textmate 2"
And I should see "Textmate 2 - Projects - Ticketee"
Scenario: Creating a project without a name
And I press "Create Project"
Then I should see "Project has not been created."
And I should see "Name can't be blank"
ing the default profile...
Feature: Creating projects
In order to have projects to assign tickets to
As a user
I want to create them easily
Background: # features/creating_projects.feature:5
Given I am on the root_path # features/step_definitions/createProject_steps.rb:1
When I follow "New Project" # features/step_definitions/createProject_steps.rb:5
Scenario: Creating a project # features/creating_projects.feature:8
And I fill in "Name" with "Textmate 2" # features/step_definitions/createProject_steps.rb:9
And I press "Create Project" # features/step_definitions/createProject_steps.rb:13
Then I should see "Project has been created" # features/step_definitions/createProject_steps.rb:17
And I should be on the project page for "Textmate 2" # features/step_definitions/createProject_steps.rb:21
And I should see "Textmate 2 - Projects - Ticketee" # features/step_definitions/createProject_steps.rb:17
Scenario: Creating a project without a name # features/creating_projects.feature:14
And I press "Create Project" # features/step_definitions/createProject_steps.rb:13
Then I should see "Project has not been created." # features/step_definitions/createProject_steps.rb:17
expected there to be content "Project has not been created." in "\n Ticketee\n \n\nDevelop Your First New Project\n\n 1 error prohibited this project from being savedThere were problems with the following fields:Name can't be blank\n \n Name\n \n \n \n\n\n" (RSpec::Expectations::ExpectationNotMetError)
./features/step_definitions/createProject_steps.rb:18:in `/^I should see "([^"]*)"$/'
features/creating_projects.feature:16:in `Then I should see "Project has not been created."'
And I should see "Name can't be blank" # features/step_definitions/createProject_steps.rb:17
Failing Scenarios:
cucumber features/creating_projects.feature:14 # Scenario: Creating a project without a name
2 scenarios (1 failed, 1 passed)
12 steps (1 failed, 1 skipped, 10 passed)
0m0.356s
rake aborted!
Command failed with status (1): [/Users/Griff/.rbenv/versions/1.9.3-p0/bin/...]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment