SlideShare a Scribd company logo
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

More Related Content

What's hot

Marketing 1 182798-1 (1)
Marketing 1 182798-1 (1)Marketing 1 182798-1 (1)
Marketing 1 182798-1 (1)
Al Baha University
 
Les serrures abloy par vedis
Les serrures abloy par vedisLes serrures abloy par vedis
Les serrures abloy par vedis
VEDIS Les serrures intelligentes ABLOY
 
Buzzient siebel-roadmap
Buzzient siebel-roadmapBuzzient siebel-roadmap
Buzzient siebel-roadmap
TBJ Investments, LLC
 
PRML ベイズロジスティック回帰 4.5 4.5.2
PRML ベイズロジスティック回帰 4.5 4.5.2PRML ベイズロジスティック回帰 4.5 4.5.2
PRML ベイズロジスティック回帰 4.5 4.5.2
tmtm 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-11
blueridgesustainability
 
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
 
Sergi gomez
Sergi gomezSergi gomez
Sergi gomez
Ramon Barlam
 
广告汇聚上海最具影响力读者群体东方早报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 Soul
Scott Hoffman
 
OIF040 HR & Social Media
OIF040 HR & Social MediaOIF040 HR & Social Media
OIF040 HR & Social Media
Diana Russo
 

What's hot (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
 

Viewers also liked

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

Viewers also liked (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
 

Similar to BDD de fuera a dentro

Controller specs
Controller specsController specs
Controller specs
Alexander Miller
 
Doctrine For Beginners
Doctrine For BeginnersDoctrine For Beginners
Doctrine For Beginners
Jonathan Wage
 
RubyBarCamp “Полезные gems и plugins”
RubyBarCamp “Полезные gems и plugins”RubyBarCamp “Полезные gems и plugins”
RubyBarCamp “Полезные gems и plugins”
apostlion
 
Backbone js
Backbone jsBackbone js
Backbone js
rstankov
 
Real Time App with Node.js
Real Time App with Node.jsReal Time App with Node.js
Real Time App with Node.js
Jxck 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 plugins
Pierre MARTIN
 
Rspec and Rails
Rspec and RailsRspec and Rails
Rspec and Rails
Icalia Labs
 
Binary Studio Academy 2016: Laravel Controllers
Binary Studio Academy 2016: Laravel ControllersBinary Studio Academy 2016: Laravel Controllers
Binary Studio Academy 2016: Laravel Controllers
Binary 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 more
Ryan Weaver
 
FamilySearch Reference Client
FamilySearch Reference ClientFamilySearch Reference Client
FamilySearch Reference Client
Dallan Quass
 
Building Your First Widget
Building Your First WidgetBuilding Your First Widget
Building Your First Widget
Chris 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 Apps
Morgan 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 McDiarmid
Amrita Chopra
 
Bag Of Tricks From Iusethis
Bag Of Tricks From IusethisBag Of Tricks From Iusethis
Bag Of Tricks From Iusethis
Marcus Ramberg
 
Routing in Drupal 8
Routing in Drupal 8Routing in Drupal 8
Routing in Drupal 8
kgoel1
 

Similar to 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
 

Recently uploaded

Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
Peter Spielvogel
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 

Recently uploaded (20)

Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 

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