SlideShare une entreprise Scribd logo
1  sur  69
Télécharger pour lire hors ligne
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

Contenu connexe

Tendances

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
 

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

En vedette

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
 

En vedette (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
 

Similaire à 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
 

Similaire à 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
 

Dernier

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Principled Technologies
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 

Dernier (20)

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 

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