SlideShare ist ein Scribd-Unternehmen logo
1 von 69
Downloaden Sie, um offline zu lesen
scenario 'List of users' do
  create_user 'mary'
  create_user 'paul'

  visit users_page

  assert page.has_content?('mary')
  assert page.has_content?('paul')
end
scenario 'List of users' do
  create_user 'mary'
  create_user 'paul'

  visit users_page

  assert page.has_content?('mary')
  assert page.has_content?('paul')
end
$ rails g model User name:string
scenario 'List of users' do
  create_user 'mary'
  create_user 'paul'

  visit users_page

  assert page.has_content?('mary')
  assert page.has_content?('paul')
end
$ rails g controller users index
scenario 'List of users' do
  create_user 'mary'
  create_user 'paul'

  visit users_page

  assert page.has_content?('mary')
  assert page.has_content?('paul')
end
describe 'users/index.html.erb' do
 it 'renders the list of users' do
      render_view :users => [mock(:name => 'Joe')]
      assert_contains rendered, 'Joe'
 end
end
describe 'users/index.html.erb' do
 it 'renders the list of users' do
      render_view :users => [mock(:name => 'Joe')]
      assert_contains rendered, 'Joe'
 end
end
describe 'users/index.html.erb' do
 it 'renders the list of users' do
      render_view :users => [mock(:name => 'Joe')]
      assert_contains rendered, 'Joe'
 end
end
<h2>Users</h2>
<ul>
  <%= @users.each do |user| %>
  <li>
    <%= user.name %>
  </li>
  <% end %>
</ul>
<h2>Users</h2>
<ul>
  <%= @users.each do |user| %>
  <li>
    <%= user.name %>
  </li>
  <% end %>
</ul>
<h2>Users</h2>
<ul>
  <%= @users.each do |user| %>
  <li>
    <%= user.name %>
  </li>
  <% end %>
</ul>
scenario 'List of users' do
  create_user 'mary'
  create_user 'paul'

  visit users_page

  assert page.has_content?('mary')
  assert page.has_content?('paul')
end
describe UsersController do
 describe 'GET index' do
      it 'assigns the users' do
       User.stub(:all => users_stub)
       get :index
       assert_equal users_stub, assigns[:user]
      end
 end
end
describe UsersController do
 describe 'GET index' do
      it 'assigns the users' do
       User.stub(:all => users_stub)
       get :index
       assert_equal users_stub, assigns[:user]
      end
 end
end
describe UsersController do
 describe 'GET index' do
      it 'assigns the users' do
       User.stub(:all => users_stub)
       get :index
       assert_equal users_stub, assigns[:user]
      end
 end
end
describe UsersController do
 describe 'GET index' do
      it 'assigns the users' do
       User.stub(:all => users_stub)
       get :index
       assert_equal users_stub, assigns[:user]
      end
 end
end
class UsersController
  def index
    @users = User.all
  end
end
class UsersController
  def index
    @users = User.all
  end
end
scenario 'List of users' do
  create_user 'mary'
  create_user 'paul'

  visit users_page

  assert page.has_content?('mary')
  assert page.has_content?('paul')
end
BDD de fuera a dentro
BDD de fuera a dentro
BDD de fuera a dentro
BDD de fuera a dentro
BDD de fuera a dentro
BDD de fuera a dentro
BDD de fuera a dentro
BDD de fuera a dentro
BDD de fuera a dentro
BDD de fuera a dentro

Weitere ähnliche Inhalte

Was ist angesagt?

PRML ベイズロジスティック回帰 4.5 4.5.2
PRML ベイズロジスティック回帰 4.5 4.5.2PRML ベイズロジスティック回帰 4.5 4.5.2
PRML ベイズロジスティック回帰 4.5 4.5.2tmtm otm
 
Alice Cohen - Ecotourism Green Mondays 12-12-11
Alice Cohen - Ecotourism Green Mondays 12-12-11Alice Cohen - Ecotourism Green Mondays 12-12-11
Alice Cohen - Ecotourism Green Mondays 12-12-11blueridgesustainability
 
SydStart 2010 Spring Pitch by Eric Bae CEO of Freally recycling
SydStart 2010 Spring Pitch by Eric Bae CEO of Freally recyclingSydStart 2010 Spring Pitch by Eric Bae CEO of Freally recycling
SydStart 2010 Spring Pitch by Eric Bae CEO of Freally recyclingThe Start Society
 
Writing Sample Press Relaease
Writing Sample Press RelaeaseWriting Sample Press Relaease
Writing Sample Press Relaeasetbartlett21
 
DeCaro Luxury Auction Seller Presentation_
DeCaro  Luxury Auction Seller Presentation_DeCaro  Luxury Auction Seller Presentation_
DeCaro Luxury Auction Seller Presentation_John Torrey
 
Patrick Murphy's Presentation at Emerging Communication Conference & Awards Am
Patrick Murphy's Presentation at Emerging Communication Conference & Awards AmPatrick Murphy's Presentation at Emerging Communication Conference & Awards Am
Patrick Murphy's Presentation at Emerging Communication Conference & Awards AmeCommConf
 
广告汇聚上海最具影响力读者群体东方早报2008年新征程将奉献更多投资智 ...
广告汇聚上海最具影响力读者群体东方早报2008年新征程将奉献更多投资智 ...广告汇聚上海最具影响力读者群体东方早报2008年新征程将奉献更多投资智 ...
广告汇聚上海最具影响力读者群体东方早报2008年新征程将奉献更多投资智 ...sugeladi
 
Status Updates are the Window to Your Soul
Status Updates are the Window to Your SoulStatus Updates are the Window to Your Soul
Status Updates are the Window to Your SoulScott Hoffman
 
OIF040 HR & Social Media
OIF040 HR & Social MediaOIF040 HR & Social Media
OIF040 HR & Social MediaDiana Russo
 

Was ist angesagt? (16)

Marketing 1 182798-1 (1)
Marketing 1 182798-1 (1)Marketing 1 182798-1 (1)
Marketing 1 182798-1 (1)
 
Les serrures abloy par vedis
Les serrures abloy par vedisLes serrures abloy par vedis
Les serrures abloy par vedis
 
8akh5
8akh58akh5
8akh5
 
Buzzient siebel-roadmap
Buzzient siebel-roadmapBuzzient siebel-roadmap
Buzzient siebel-roadmap
 
Array
ArrayArray
Array
 
PRML ベイズロジスティック回帰 4.5 4.5.2
PRML ベイズロジスティック回帰 4.5 4.5.2PRML ベイズロジスティック回帰 4.5 4.5.2
PRML ベイズロジスティック回帰 4.5 4.5.2
 
Alice Cohen - Ecotourism Green Mondays 12-12-11
Alice Cohen - Ecotourism Green Mondays 12-12-11Alice Cohen - Ecotourism Green Mondays 12-12-11
Alice Cohen - Ecotourism Green Mondays 12-12-11
 
SydStart 2010 Spring Pitch by Eric Bae CEO of Freally recycling
SydStart 2010 Spring Pitch by Eric Bae CEO of Freally recyclingSydStart 2010 Spring Pitch by Eric Bae CEO of Freally recycling
SydStart 2010 Spring Pitch by Eric Bae CEO of Freally recycling
 
Writing Sample Press Relaease
Writing Sample Press RelaeaseWriting Sample Press Relaease
Writing Sample Press Relaease
 
DeCaro Luxury Auction Seller Presentation_
DeCaro  Luxury Auction Seller Presentation_DeCaro  Luxury Auction Seller Presentation_
DeCaro Luxury Auction Seller Presentation_
 
Patrick Murphy's Presentation at Emerging Communication Conference & Awards Am
Patrick Murphy's Presentation at Emerging Communication Conference & Awards AmPatrick Murphy's Presentation at Emerging Communication Conference & Awards Am
Patrick Murphy's Presentation at Emerging Communication Conference & Awards Am
 
Isilimela Technologies flyer[1]
Isilimela Technologies flyer[1]Isilimela Technologies flyer[1]
Isilimela Technologies flyer[1]
 
Sergi gomez
Sergi gomezSergi gomez
Sergi gomez
 
广告汇聚上海最具影响力读者群体东方早报2008年新征程将奉献更多投资智 ...
广告汇聚上海最具影响力读者群体东方早报2008年新征程将奉献更多投资智 ...广告汇聚上海最具影响力读者群体东方早报2008年新征程将奉献更多投资智 ...
广告汇聚上海最具影响力读者群体东方早报2008年新征程将奉献更多投资智 ...
 
Status Updates are the Window to Your Soul
Status Updates are the Window to Your SoulStatus Updates are the Window to Your Soul
Status Updates are the Window to Your Soul
 
OIF040 HR & Social Media
OIF040 HR & Social MediaOIF040 HR & Social Media
OIF040 HR & Social Media
 

Andere mochten auch

Acceptance Testing with Webrat
Acceptance Testing with WebratAcceptance Testing with Webrat
Acceptance Testing with WebratLuismi Cavallé
 
BDD de Aceptación con Ruby
BDD de Aceptación con RubyBDD de Aceptación con Ruby
BDD de Aceptación con RubyLuismi Cavallé
 
Fighting Bottlencks with CQRS - ResearchGate
Fighting Bottlencks with CQRS - ResearchGateFighting Bottlencks with CQRS - ResearchGate
Fighting Bottlencks with CQRS - ResearchGateMathias Verraes
 
From ActiveRecord to EventSourcing
From ActiveRecord to EventSourcingFrom ActiveRecord to EventSourcing
From ActiveRecord to EventSourcingEmanuele DelBono
 
Towards Modelling Processes
Towards Modelling ProcessesTowards Modelling Processes
Towards Modelling ProcessesMathias Verraes
 

Andere mochten auch (6)

Acceptance Testing with Webrat
Acceptance Testing with WebratAcceptance Testing with Webrat
Acceptance Testing with Webrat
 
BDD de Aceptación con Ruby
BDD de Aceptación con RubyBDD de Aceptación con Ruby
BDD de Aceptación con Ruby
 
Fighting Bottlencks with CQRS - ResearchGate
Fighting Bottlencks with CQRS - ResearchGateFighting Bottlencks with CQRS - ResearchGate
Fighting Bottlencks with CQRS - ResearchGate
 
The CQRS diet
The CQRS dietThe CQRS diet
The CQRS diet
 
From ActiveRecord to EventSourcing
From ActiveRecord to EventSourcingFrom ActiveRecord to EventSourcing
From ActiveRecord to EventSourcing
 
Towards Modelling Processes
Towards Modelling ProcessesTowards Modelling Processes
Towards Modelling Processes
 

Ähnlich wie BDD de fuera a dentro

Doctrine For Beginners
Doctrine For BeginnersDoctrine For Beginners
Doctrine For BeginnersJonathan Wage
 
RubyBarCamp “Полезные gems и plugins”
RubyBarCamp “Полезные gems и plugins”RubyBarCamp “Полезные gems и plugins”
RubyBarCamp “Полезные gems и plugins”apostlion
 
Backbone js
Backbone jsBackbone js
Backbone jsrstankov
 
Real Time App with Node.js
Real Time App with Node.jsReal Time App with Node.js
Real Time App with Node.jsJxck Jxck
 
Building Web Service Clients with ActiveModel
Building Web Service Clients with ActiveModelBuilding Web Service Clients with ActiveModel
Building Web Service Clients with ActiveModelpauldix
 
Building Web Service Clients with ActiveModel
Building Web Service Clients with ActiveModelBuilding Web Service Clients with ActiveModel
Building Web Service Clients with ActiveModelpauldix
 
Using and reusing CakePHP plugins
Using and reusing CakePHP pluginsUsing and reusing CakePHP plugins
Using and reusing CakePHP pluginsPierre MARTIN
 
Binary Studio Academy 2016: Laravel Controllers
Binary Studio Academy 2016: Laravel ControllersBinary Studio Academy 2016: Laravel Controllers
Binary Studio Academy 2016: Laravel ControllersBinary Studio
 
Symfony Guard Authentication: Fun with API Token, Social Login, JWT and more
Symfony Guard Authentication: Fun with API Token, Social Login, JWT and moreSymfony Guard Authentication: Fun with API Token, Social Login, JWT and more
Symfony Guard Authentication: Fun with API Token, Social Login, JWT and moreRyan Weaver
 
FamilySearch Reference Client
FamilySearch Reference ClientFamilySearch Reference Client
FamilySearch Reference ClientDallan Quass
 
Building Your First Widget
Building Your First WidgetBuilding Your First Widget
Building Your First WidgetChris Wilcoxson
 
Django Class-based views (Slovenian)
Django Class-based views (Slovenian)Django Class-based views (Slovenian)
Django Class-based views (Slovenian)Luka Zakrajšek
 
Rails Routing and URL design
Rails Routing and URL designRails Routing and URL design
Rails Routing and URL designhiq5
 
Optimizing Angular Performance in Enterprise Single Page Apps
Optimizing Angular Performance in Enterprise Single Page AppsOptimizing Angular Performance in Enterprise Single Page Apps
Optimizing Angular Performance in Enterprise Single Page AppsMorgan Stone
 
Angular 2 Component Communication - Talk by Rob McDiarmid
Angular 2 Component Communication - Talk by Rob McDiarmidAngular 2 Component Communication - Talk by Rob McDiarmid
Angular 2 Component Communication - Talk by Rob McDiarmidAmrita Chopra
 
Bag Of Tricks From Iusethis
Bag Of Tricks From IusethisBag Of Tricks From Iusethis
Bag Of Tricks From IusethisMarcus Ramberg
 
Routing in Drupal 8
Routing in Drupal 8Routing in Drupal 8
Routing in Drupal 8kgoel1
 

Ähnlich wie BDD de fuera a dentro (20)

Controller specs
Controller specsController specs
Controller specs
 
Doctrine For Beginners
Doctrine For BeginnersDoctrine For Beginners
Doctrine For Beginners
 
RubyBarCamp “Полезные gems и plugins”
RubyBarCamp “Полезные gems и plugins”RubyBarCamp “Полезные gems и plugins”
RubyBarCamp “Полезные gems и plugins”
 
Backbone js
Backbone jsBackbone js
Backbone js
 
Real Time App with Node.js
Real Time App with Node.jsReal Time App with Node.js
Real Time App with Node.js
 
Building Web Service Clients with ActiveModel
Building Web Service Clients with ActiveModelBuilding Web Service Clients with ActiveModel
Building Web Service Clients with ActiveModel
 
Building Web Service Clients with ActiveModel
Building Web Service Clients with ActiveModelBuilding Web Service Clients with ActiveModel
Building Web Service Clients with ActiveModel
 
Using and reusing CakePHP plugins
Using and reusing CakePHP pluginsUsing and reusing CakePHP plugins
Using and reusing CakePHP plugins
 
Rspec and Rails
Rspec and RailsRspec and Rails
Rspec and Rails
 
Binary Studio Academy 2016: Laravel Controllers
Binary Studio Academy 2016: Laravel ControllersBinary Studio Academy 2016: Laravel Controllers
Binary Studio Academy 2016: Laravel Controllers
 
Symfony Guard Authentication: Fun with API Token, Social Login, JWT and more
Symfony Guard Authentication: Fun with API Token, Social Login, JWT and moreSymfony Guard Authentication: Fun with API Token, Social Login, JWT and more
Symfony Guard Authentication: Fun with API Token, Social Login, JWT and more
 
Django
DjangoDjango
Django
 
FamilySearch Reference Client
FamilySearch Reference ClientFamilySearch Reference Client
FamilySearch Reference Client
 
Building Your First Widget
Building Your First WidgetBuilding Your First Widget
Building Your First Widget
 
Django Class-based views (Slovenian)
Django Class-based views (Slovenian)Django Class-based views (Slovenian)
Django Class-based views (Slovenian)
 
Rails Routing and URL design
Rails Routing and URL designRails Routing and URL design
Rails Routing and URL design
 
Optimizing Angular Performance in Enterprise Single Page Apps
Optimizing Angular Performance in Enterprise Single Page AppsOptimizing Angular Performance in Enterprise Single Page Apps
Optimizing Angular Performance in Enterprise Single Page Apps
 
Angular 2 Component Communication - Talk by Rob McDiarmid
Angular 2 Component Communication - Talk by Rob McDiarmidAngular 2 Component Communication - Talk by Rob McDiarmid
Angular 2 Component Communication - Talk by Rob McDiarmid
 
Bag Of Tricks From Iusethis
Bag Of Tricks From IusethisBag Of Tricks From Iusethis
Bag Of Tricks From Iusethis
 
Routing in Drupal 8
Routing in Drupal 8Routing in Drupal 8
Routing in Drupal 8
 

Kürzlich hochgeladen

Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 

Kürzlich hochgeladen (20)

Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 

BDD de fuera a dentro

  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30. scenario 'List of users' do create_user 'mary' create_user 'paul' visit users_page assert page.has_content?('mary') assert page.has_content?('paul') end
  • 31. scenario 'List of users' do create_user 'mary' create_user 'paul' visit users_page assert page.has_content?('mary') assert page.has_content?('paul') end
  • 32. $ rails g model User name:string
  • 33. scenario 'List of users' do create_user 'mary' create_user 'paul' visit users_page assert page.has_content?('mary') assert page.has_content?('paul') end
  • 34. $ rails g controller users index
  • 35. scenario 'List of users' do create_user 'mary' create_user 'paul' visit users_page assert page.has_content?('mary') assert page.has_content?('paul') end
  • 36.
  • 37.
  • 38. describe 'users/index.html.erb' do it 'renders the list of users' do render_view :users => [mock(:name => 'Joe')] assert_contains rendered, 'Joe' end end
  • 39. describe 'users/index.html.erb' do it 'renders the list of users' do render_view :users => [mock(:name => 'Joe')] assert_contains rendered, 'Joe' end end
  • 40. describe 'users/index.html.erb' do it 'renders the list of users' do render_view :users => [mock(:name => 'Joe')] assert_contains rendered, 'Joe' end end
  • 41.
  • 42. <h2>Users</h2> <ul> <%= @users.each do |user| %> <li> <%= user.name %> </li> <% end %> </ul>
  • 43. <h2>Users</h2> <ul> <%= @users.each do |user| %> <li> <%= user.name %> </li> <% end %> </ul>
  • 44. <h2>Users</h2> <ul> <%= @users.each do |user| %> <li> <%= user.name %> </li> <% end %> </ul>
  • 45.
  • 46.
  • 47. scenario 'List of users' do create_user 'mary' create_user 'paul' visit users_page assert page.has_content?('mary') assert page.has_content?('paul') end
  • 48.
  • 49.
  • 50. describe UsersController do describe 'GET index' do it 'assigns the users' do User.stub(:all => users_stub) get :index assert_equal users_stub, assigns[:user] end end end
  • 51. describe UsersController do describe 'GET index' do it 'assigns the users' do User.stub(:all => users_stub) get :index assert_equal users_stub, assigns[:user] end end end
  • 52. describe UsersController do describe 'GET index' do it 'assigns the users' do User.stub(:all => users_stub) get :index assert_equal users_stub, assigns[:user] end end end
  • 53. describe UsersController do describe 'GET index' do it 'assigns the users' do User.stub(:all => users_stub) get :index assert_equal users_stub, assigns[:user] end end end
  • 54.
  • 55. class UsersController def index @users = User.all end end
  • 56. class UsersController def index @users = User.all end end
  • 57.
  • 58.
  • 59. scenario 'List of users' do create_user 'mary' create_user 'paul' visit users_page assert page.has_content?('mary') assert page.has_content?('paul') end