SlideShare uma empresa Scribd logo
1 de 69
Baixar para ler offline
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

Mais conteúdo relacionado

Mais procurados

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
 

Mais procurados (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
 

Destaque

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
 

Destaque (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
 

Semelhante a 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
 

Semelhante a 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
 

Último

Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
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
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 

Último (20)

Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
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
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 

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