08448380779 Call Girls In Civil Lines Women Seeking Men
Behavior Driven Development with Cucumber
1. Behavior Driven Development
Cucumber
with
Brandon Keepers ● Collective idea ● http://opensoul.org
http://flickr.com/photos/nickatkins/527421404/
2. Feature: Cucumber
In order to share the love
As a presenter
I will demonstrate behavior driven development with Cucumber
Scenario: Behavior Driven Development with Cucumber
Given a desire for higher quality software
And a tool that executes feature documentation written in plain text
When you watch this presentation
Then you will gain an understanding of behavior driven development
And see examples of behavior driven development with cucumber
And be equipped to integrate Cucumber into your development process
8. In order to keep of track movies that I want to see
As a NetFlix customer
I can add movies to a queue
http://dannorth.net/whats-in-a-story
9. va l ue p ro p o s i t i o n
In order to keep of track movies that I want to see
As a NetFlix customer
I can add movies to a queue
http://dannorth.net/whats-in-a-story
10. In order to keep of track movies that I want to see
As a NetFlix customer role
I can add movies to a queue
http://dannorth.net/whats-in-a-story
11. In order to keep of track movies that I want to see
As a NetFlix customer
I can add movies to a queue
e at u re
f
http://dannorth.net/whats-in-a-story
30. Feature: Manage companies
In order to keep track of companies
A user
Should be able to manage companies
Scenario: Create a new company
Given I am logged in
When I create a new company named Acme
Then I should see that a company named Acme exists
32. Given == Setup
Given quot;I am logged inquot; do
user = Factory(:user)
visits new_session_path
fills_in ‘Login’, :with => user.login
fills_in ‘Password’, :with => user.password
clicks_button ‘Login’
end
33. Given quot;I am logged inquot; do
user = Factory(:user)
f ac t o r y_g i r l
visits new_session_path
fills_in ‘Login’, :with => user.login
fills_in ‘Password’, :with => user.password
clicks_button ‘Login’
end
Factory.sequence(:email) {|n| quot;user#{n}@example.comquot; }
Factory.define :user do |user|
user.name 'User'
user.email { Factory.next(:email) }
user.login {|u| u.email }
user.password 'password'
user.password_confirmation 'password'
end
34. Given quot;I am logged inquot; do
user = Factory(:user)
visits new_session_path
fills_in 'Login', :with => user.login
fills_in 'Password', :with => user.password
clicks_button 'Login'
end
we b rat
35. When == Change
When quot;I create a new company named $namequot; do |name|
visits new_company_path
fills_in 'Name', :with => name
clicks_button 'Create'
end
36. When == Change
v a r i a ble
When quot;I create a new company named $namequot; do |name|
visits new_company_path
fills_in 'Name', :with => name
clicks_button 'Create'
end
When I create a new company named Acme
37. Then == Outcome
Then quot;I should see that a company named $name existsquot; do |name|
response.body.should =~ Regexp.new(name)
end
38. Feature: Manage companies
In order to keep track of companies
A user
Should be able to manage companies
Scenario: Create a new company
Given I am logged in
When I create a new company named Acme
Then I should see that a company named Acme exists
3 steps passsed
39. Scenario: Paging through leads and rejecting
Given a company called Apple Corp.
And a company called Pear Inc.
And a list for Client A
And Apple Corp. is a new lead in a list for Client A
And Pear Inc. is a new lead in a list for Client A
And I am logged in as a staff member
When I view the company overview for Apple Corp.
And I reject Apple Corp.
And I go to the next lead
Then I see the company overview for Pear Inc.
43. Feature: Cucumber
In order to share the love
As a presenter
I will demonstrate behavior driven development with Cucumber
Scenario: Behavior Driven Development with Cucumber
Given a desire for higher quality software
And a tool that executes feature documentation written in plain text
When you watch this presentation
Then you will gain an understanding of behavior driven development
And see examples of behavior driven development with cucumber
And be equipped to integrate Cucumber into your development process
6 steps passed