SlideShare a Scribd company logo
RUBY TESTING
 Cucumber and RSpec
WHO IS THIS GUY?
   James Thompson
    @plainprogrammer
 james@plainprograms.com

Web Administrator & Student
  @ New Orleans Baptist
   Theological Seminary
WHY DO WE TEST?
WHAT DO WE TEST?
WHAT DON’T WE TEST?
HOW DO WE TEST?
WHAT DO WE TEST WITH?
WHAT IS CUCUMBER
•Behavior driven development tool for Ruby
•Focuses on higher level implementations such as
acceptance tests

•Focuses on story-style, plain English test descriptions
•Follows the GWT (Given, When, Then) pattern for
features
WHAT IS RSPEC

•Behavior driven development tool for Ruby
•Provides a DSL for talking about what code should do
A POSSIBLE PROCESS
•Start with a feature
•Define the steps for your feature
•Write lower-level specs
•Write code to pass specs
•Rinse and Repeat until feature passes
WRITE A FEATURE
# features/calculator.feature
Feature: Addition
  In Order to avoid silly mistakes
  As a math idiot
  I want to be told the sum of two numbers

Scenario: Add two numbers
  Given I have entered 50 into the calculator
  And I have entered 70 into the calculator
  When I press add
  Then the result should be 120 on the screen
WRITE STEPS

# features/step_definitions/calculator_steps.rb
Given /I have entered (.*) into the calculator/ do |n|
  calculator = Calculator.new
  calculator.push(n.to_i)
end
WRITE SPECS
# spec/calculator.spec
describe Calculator do
  before(:each) do
    @calculator = Calculator.new
  end

  it "should respond to push()" do
    @calculator.should respond_to(:push)
  end

  it "should respond to add()" do
    @calculator.should respond_to(:add)
  end
end
CODE UNTIL YOU PASS
class Calculator
  def push(n)
    @args ||= []
    @args << n
  end

 def add
   result = 0

   @args.each do |n|
     result += n
   end

    result
  end
end
RINSE AND REPEAT
QUESTIONS?
MORE RESOURCES


     cukes.info
     rspec.info

More Related Content

What's hot

RxSwift for Beginners - how to avoid a headache of reactive programming
RxSwift for Beginners - how to avoid a headache of reactive programmingRxSwift for Beginners - how to avoid a headache of reactive programming
RxSwift for Beginners - how to avoid a headache of reactive programming
Maciej Kołek
 
Introduction to Spring Reactor
Introduction to Spring ReactorIntroduction to Spring Reactor
Introduction to Spring Reactor
DrSimoneDiCola
 
QBASIC: A Tool For Modern Programming
QBASIC: A Tool For Modern ProgrammingQBASIC: A Tool For Modern Programming
QBASIC: A Tool For Modern Programming
Gifty Belle Manaois
 
Design & Prototype an API
Design & Prototype an APIDesign & Prototype an API
Design & Prototype an API
Postman
 
Episode 22 - Design Pattern 2
Episode 22 - Design Pattern 2Episode 22 - Design Pattern 2
Episode 22 - Design Pattern 2
Jitendra Zaa
 
Creating A User‑Defined Function In Excel Using Vba
Creating A User‑Defined Function In Excel Using VbaCreating A User‑Defined Function In Excel Using Vba
Creating A User‑Defined Function In Excel Using Vba
Chester Tugwell
 
Calabash Mobile Application Testing Overview
Calabash Mobile Application Testing OverviewCalabash Mobile Application Testing Overview
Calabash Mobile Application Testing Overview
Emil Cordun
 
Managing state in modern React web applications
Managing state in modern React web applicationsManaging state in modern React web applications
Managing state in modern React web applications
Jon Preece
 
Legacy: A Retrospective - Open West 2016
Legacy: A Retrospective - Open West 2016Legacy: A Retrospective - Open West 2016
Legacy: A Retrospective - Open West 2016
Jessica Mauerhan
 
Being Lean Agile
Being Lean AgileBeing Lean Agile
Being Lean Agile
prakashmpujar
 
Anatomy of a Reactive Application
Anatomy of a Reactive ApplicationAnatomy of a Reactive Application
Anatomy of a Reactive Application
Mark Wilson
 
Intro to javascript (6:19)
Intro to javascript (6:19)Intro to javascript (6:19)
Intro to javascript (6:19)
Thinkful
 
Episode 1 - PathToCode.com
Episode 1 - PathToCode.comEpisode 1 - PathToCode.com
Episode 1 - PathToCode.com
Jitendra Zaa
 
Bug reporting
Bug reportingBug reporting
Bug reporting
Ralu Mihordea
 
Application Performance Monitoring for WordPress
Application Performance Monitoring for WordPressApplication Performance Monitoring for WordPress
Application Performance Monitoring for WordPress
WP Engine
 
Jumpstarting Testing In Your Organization with Selenium, Cucumber, & WebdriverIO
Jumpstarting Testing In Your Organization with Selenium, Cucumber, & WebdriverIOJumpstarting Testing In Your Organization with Selenium, Cucumber, & WebdriverIO
Jumpstarting Testing In Your Organization with Selenium, Cucumber, & WebdriverIO
Josh Cypher
 
Episode 23 - Design Pattern 3
Episode 23 - Design Pattern 3Episode 23 - Design Pattern 3
Episode 23 - Design Pattern 3
Jitendra Zaa
 
Episode 19 - Asynchronous Apex - Batch apex & schedulers
Episode 19 - Asynchronous Apex - Batch apex & schedulersEpisode 19 - Asynchronous Apex - Batch apex & schedulers
Episode 19 - Asynchronous Apex - Batch apex & schedulers
Jitendra Zaa
 
Adventures with Microservices
Adventures with MicroservicesAdventures with Microservices
Adventures with Microservices
Anand Agrawal
 
DRAKON Visual Language: Tutorial. Part 2
DRAKON Visual Language: Tutorial. Part 2DRAKON Visual Language: Tutorial. Part 2
DRAKON Visual Language: Tutorial. Part 2
Stepan Mitkin
 

What's hot (20)

RxSwift for Beginners - how to avoid a headache of reactive programming
RxSwift for Beginners - how to avoid a headache of reactive programmingRxSwift for Beginners - how to avoid a headache of reactive programming
RxSwift for Beginners - how to avoid a headache of reactive programming
 
Introduction to Spring Reactor
Introduction to Spring ReactorIntroduction to Spring Reactor
Introduction to Spring Reactor
 
QBASIC: A Tool For Modern Programming
QBASIC: A Tool For Modern ProgrammingQBASIC: A Tool For Modern Programming
QBASIC: A Tool For Modern Programming
 
Design & Prototype an API
Design & Prototype an APIDesign & Prototype an API
Design & Prototype an API
 
Episode 22 - Design Pattern 2
Episode 22 - Design Pattern 2Episode 22 - Design Pattern 2
Episode 22 - Design Pattern 2
 
Creating A User‑Defined Function In Excel Using Vba
Creating A User‑Defined Function In Excel Using VbaCreating A User‑Defined Function In Excel Using Vba
Creating A User‑Defined Function In Excel Using Vba
 
Calabash Mobile Application Testing Overview
Calabash Mobile Application Testing OverviewCalabash Mobile Application Testing Overview
Calabash Mobile Application Testing Overview
 
Managing state in modern React web applications
Managing state in modern React web applicationsManaging state in modern React web applications
Managing state in modern React web applications
 
Legacy: A Retrospective - Open West 2016
Legacy: A Retrospective - Open West 2016Legacy: A Retrospective - Open West 2016
Legacy: A Retrospective - Open West 2016
 
Being Lean Agile
Being Lean AgileBeing Lean Agile
Being Lean Agile
 
Anatomy of a Reactive Application
Anatomy of a Reactive ApplicationAnatomy of a Reactive Application
Anatomy of a Reactive Application
 
Intro to javascript (6:19)
Intro to javascript (6:19)Intro to javascript (6:19)
Intro to javascript (6:19)
 
Episode 1 - PathToCode.com
Episode 1 - PathToCode.comEpisode 1 - PathToCode.com
Episode 1 - PathToCode.com
 
Bug reporting
Bug reportingBug reporting
Bug reporting
 
Application Performance Monitoring for WordPress
Application Performance Monitoring for WordPressApplication Performance Monitoring for WordPress
Application Performance Monitoring for WordPress
 
Jumpstarting Testing In Your Organization with Selenium, Cucumber, & WebdriverIO
Jumpstarting Testing In Your Organization with Selenium, Cucumber, & WebdriverIOJumpstarting Testing In Your Organization with Selenium, Cucumber, & WebdriverIO
Jumpstarting Testing In Your Organization with Selenium, Cucumber, & WebdriverIO
 
Episode 23 - Design Pattern 3
Episode 23 - Design Pattern 3Episode 23 - Design Pattern 3
Episode 23 - Design Pattern 3
 
Episode 19 - Asynchronous Apex - Batch apex & schedulers
Episode 19 - Asynchronous Apex - Batch apex & schedulersEpisode 19 - Asynchronous Apex - Batch apex & schedulers
Episode 19 - Asynchronous Apex - Batch apex & schedulers
 
Adventures with Microservices
Adventures with MicroservicesAdventures with Microservices
Adventures with Microservices
 
DRAKON Visual Language: Tutorial. Part 2
DRAKON Visual Language: Tutorial. Part 2DRAKON Visual Language: Tutorial. Part 2
DRAKON Visual Language: Tutorial. Part 2
 

Viewers also liked

Bazı Alacakların Yeniden Yapılandırılması
Bazı Alacakların Yeniden YapılandırılmasıBazı Alacakların Yeniden Yapılandırılması
Bazı Alacakların Yeniden Yapılandırılması
Shinesquad
 
Student Art
Student ArtStudent Art
To be an_entrepreneur
To be an_entrepreneurTo be an_entrepreneur
To be an_entrepreneur
Edventures1 Learning Solutions
 
Part IX - Supersymmetry
Part IX - SupersymmetryPart IX - Supersymmetry
Part IX - Supersymmetry
Maurice R. TREMBLAY
 
Sample: Student Work
Sample: Student WorkSample: Student Work
Sample: Student Work
ayana baltrip balagas
 
Fantastic Trip
Fantastic TripFantastic Trip
Fantastic Trip
guest6067361
 
Effective Pair Programming
Effective Pair ProgrammingEffective Pair Programming
Effective Pair Programming
James Thompson
 
Communication skills
Communication skillsCommunication skills
Communication skills
Edventures1 Learning Solutions
 
Relationship Building
Relationship BuildingRelationship Building
Relationship Building
Edventures1 Learning Solutions
 
Presentatie Danny Jacobs
Presentatie Danny JacobsPresentatie Danny Jacobs
Presentatie Danny JacobsWiltOne
 
Thousand Islands
Thousand IslandsThousand Islands
Thousand Islands
guest6067361
 
Group7
Group7Group7
文字の正統性
文字の正統性文字の正統性
文字の正統性
t yamo
 
Creatvity
CreatvityCreatvity
Dubai
DubaiDubai
The Holy Tridentine Mass
The Holy Tridentine MassThe Holy Tridentine Mass
The Holy Tridentine Mass
Maurice R. TREMBLAY
 
Naadam09Sydney
Naadam09SydneyNaadam09Sydney
Naadam09Sydney
Gegeen Australia
 
Put The Glass Down
Put The Glass DownPut The Glass Down
Put The Glass Down
guest6067361
 
Richard Sykula
Richard SykulaRichard Sykula
Richard Sykula
Richard Sykula
 

Viewers also liked (20)

Bazı Alacakların Yeniden Yapılandırılması
Bazı Alacakların Yeniden YapılandırılmasıBazı Alacakların Yeniden Yapılandırılması
Bazı Alacakların Yeniden Yapılandırılması
 
Student Art
Student ArtStudent Art
Student Art
 
To be an_entrepreneur
To be an_entrepreneurTo be an_entrepreneur
To be an_entrepreneur
 
Part IX - Supersymmetry
Part IX - SupersymmetryPart IX - Supersymmetry
Part IX - Supersymmetry
 
Sample: Student Work
Sample: Student WorkSample: Student Work
Sample: Student Work
 
Fantastic Trip
Fantastic TripFantastic Trip
Fantastic Trip
 
Effective Pair Programming
Effective Pair ProgrammingEffective Pair Programming
Effective Pair Programming
 
Communication skills
Communication skillsCommunication skills
Communication skills
 
Relationship Building
Relationship BuildingRelationship Building
Relationship Building
 
Presentatie Danny Jacobs
Presentatie Danny JacobsPresentatie Danny Jacobs
Presentatie Danny Jacobs
 
Thousand Islands
Thousand IslandsThousand Islands
Thousand Islands
 
Group7
Group7Group7
Group7
 
文字の正統性
文字の正統性文字の正統性
文字の正統性
 
Creatvity
CreatvityCreatvity
Creatvity
 
Dubai
DubaiDubai
Dubai
 
0culture centre
0culture centre0culture centre
0culture centre
 
The Holy Tridentine Mass
The Holy Tridentine MassThe Holy Tridentine Mass
The Holy Tridentine Mass
 
Naadam09Sydney
Naadam09SydneyNaadam09Sydney
Naadam09Sydney
 
Put The Glass Down
Put The Glass DownPut The Glass Down
Put The Glass Down
 
Richard Sykula
Richard SykulaRichard Sykula
Richard Sykula
 

Similar to Ruby Testing: Cucumber and RSpec

Intro to TDD and BDD
Intro to TDD and BDDIntro to TDD and BDD
Intro to TDD and BDD
Jason Noble
 
Qbasic notes
Qbasic notesQbasic notes
Qbasic notes
NasirRohail1
 
Tdd for BT E2E test community
Tdd for BT E2E test communityTdd for BT E2E test community
Tdd for BT E2E test community
Kerry Buckley
 
Programming Fundamentals
Programming FundamentalsProgramming Fundamentals
Programming Fundamentals
Trivuz ত্রিভুজ
 
Dutch PHP Conference 2013: Distilled
Dutch PHP Conference 2013: DistilledDutch PHP Conference 2013: Distilled
Dutch PHP Conference 2013: Distilled
Zumba Fitness - Technology Team
 
BDD testing with cucumber
BDD testing with cucumberBDD testing with cucumber
BDD testing with cucumber
Daniel Kummer
 
Introduction to programming - class 2
Introduction to programming - class 2Introduction to programming - class 2
Introduction to programming - class 2
Paul Brebner
 
Tdd pecha kucha_v2
Tdd pecha kucha_v2Tdd pecha kucha_v2
Tdd pecha kucha_v2
Paul Boos
 
Software Quality Engineering
Software Quality EngineeringSoftware Quality Engineering
Software Quality Engineering
Hafiz Muhammad Ahmad Naeem
 
Algorithms - Introduction to computer programming
Algorithms - Introduction to computer programmingAlgorithms - Introduction to computer programming
Algorithms - Introduction to computer programming
baabtra.com - No. 1 supplier of quality freshers
 
UNIT 1.pptx
UNIT 1.pptxUNIT 1.pptx
UNIT 1.pptx
ShaswatSurya
 
Lazy, Lazy, Lazy all the things !
Lazy, Lazy, Lazy all the things !Lazy, Lazy, Lazy all the things !
Lazy, Lazy, Lazy all the things !
Shaunak Pagnis
 
Logic Development and Algorithm.
Logic Development and Algorithm.Logic Development and Algorithm.
Logic Development and Algorithm.
NandiniSidana
 
Introduction to Flowchart
Introduction to FlowchartIntroduction to Flowchart
Introduction to Flowchart
ChristopherEsteban2
 
01 Programming Fundamentals.pptx
01 Programming Fundamentals.pptx01 Programming Fundamentals.pptx
01 Programming Fundamentals.pptx
JustineLincopinesAlm
 
2. Algorithms Representations (C++).pptx
2. Algorithms Representations (C++).pptx2. Algorithms Representations (C++).pptx
2. Algorithms Representations (C++).pptx
ssuser4d77b2
 
Thinking in Functions
Thinking in FunctionsThinking in Functions
Thinking in Functions
Alexandru Bolboaca
 
ProgFund_Lecture_4_Functions_and_Modules-1.pdf
ProgFund_Lecture_4_Functions_and_Modules-1.pdfProgFund_Lecture_4_Functions_and_Modules-1.pdf
ProgFund_Lecture_4_Functions_and_Modules-1.pdf
lailoesakhan
 
UNIT-2-PPTS-DAA.ppt
UNIT-2-PPTS-DAA.pptUNIT-2-PPTS-DAA.ppt
UNIT-2-PPTS-DAA.ppt
GovindUpadhyay25
 
Csc 130 class 2 problem analysis and flow charts(2)
Csc 130 class 2   problem analysis and flow charts(2)Csc 130 class 2   problem analysis and flow charts(2)
Csc 130 class 2 problem analysis and flow charts(2)
Puneet narula
 

Similar to Ruby Testing: Cucumber and RSpec (20)

Intro to TDD and BDD
Intro to TDD and BDDIntro to TDD and BDD
Intro to TDD and BDD
 
Qbasic notes
Qbasic notesQbasic notes
Qbasic notes
 
Tdd for BT E2E test community
Tdd for BT E2E test communityTdd for BT E2E test community
Tdd for BT E2E test community
 
Programming Fundamentals
Programming FundamentalsProgramming Fundamentals
Programming Fundamentals
 
Dutch PHP Conference 2013: Distilled
Dutch PHP Conference 2013: DistilledDutch PHP Conference 2013: Distilled
Dutch PHP Conference 2013: Distilled
 
BDD testing with cucumber
BDD testing with cucumberBDD testing with cucumber
BDD testing with cucumber
 
Introduction to programming - class 2
Introduction to programming - class 2Introduction to programming - class 2
Introduction to programming - class 2
 
Tdd pecha kucha_v2
Tdd pecha kucha_v2Tdd pecha kucha_v2
Tdd pecha kucha_v2
 
Software Quality Engineering
Software Quality EngineeringSoftware Quality Engineering
Software Quality Engineering
 
Algorithms - Introduction to computer programming
Algorithms - Introduction to computer programmingAlgorithms - Introduction to computer programming
Algorithms - Introduction to computer programming
 
UNIT 1.pptx
UNIT 1.pptxUNIT 1.pptx
UNIT 1.pptx
 
Lazy, Lazy, Lazy all the things !
Lazy, Lazy, Lazy all the things !Lazy, Lazy, Lazy all the things !
Lazy, Lazy, Lazy all the things !
 
Logic Development and Algorithm.
Logic Development and Algorithm.Logic Development and Algorithm.
Logic Development and Algorithm.
 
Introduction to Flowchart
Introduction to FlowchartIntroduction to Flowchart
Introduction to Flowchart
 
01 Programming Fundamentals.pptx
01 Programming Fundamentals.pptx01 Programming Fundamentals.pptx
01 Programming Fundamentals.pptx
 
2. Algorithms Representations (C++).pptx
2. Algorithms Representations (C++).pptx2. Algorithms Representations (C++).pptx
2. Algorithms Representations (C++).pptx
 
Thinking in Functions
Thinking in FunctionsThinking in Functions
Thinking in Functions
 
ProgFund_Lecture_4_Functions_and_Modules-1.pdf
ProgFund_Lecture_4_Functions_and_Modules-1.pdfProgFund_Lecture_4_Functions_and_Modules-1.pdf
ProgFund_Lecture_4_Functions_and_Modules-1.pdf
 
UNIT-2-PPTS-DAA.ppt
UNIT-2-PPTS-DAA.pptUNIT-2-PPTS-DAA.ppt
UNIT-2-PPTS-DAA.ppt
 
Csc 130 class 2 problem analysis and flow charts(2)
Csc 130 class 2   problem analysis and flow charts(2)Csc 130 class 2   problem analysis and flow charts(2)
Csc 130 class 2 problem analysis and flow charts(2)
 

More from James Thompson

Interfaces Not Required — RubyHACK 2018
Interfaces Not Required — RubyHACK 2018Interfaces Not Required — RubyHACK 2018
Interfaces Not Required — RubyHACK 2018
James Thompson
 
Bounded Contexts for Legacy Code
Bounded Contexts for Legacy CodeBounded Contexts for Legacy Code
Bounded Contexts for Legacy Code
James Thompson
 
Beyond Accidental Arcitecture
Beyond Accidental ArcitectureBeyond Accidental Arcitecture
Beyond Accidental Arcitecture
James Thompson
 
Wrapping an api with a ruby gem
Wrapping an api with a ruby gemWrapping an api with a ruby gem
Wrapping an api with a ruby gem
James Thompson
 
Microservices for the Monolith
Microservices for the MonolithMicroservices for the Monolith
Microservices for the Monolith
James Thompson
 
Mocking & Stubbing
Mocking & StubbingMocking & Stubbing
Mocking & Stubbing
James Thompson
 
Learn Ruby 2011 - Session 5 - Looking for a Rescue
Learn Ruby 2011 - Session 5 - Looking for a RescueLearn Ruby 2011 - Session 5 - Looking for a Rescue
Learn Ruby 2011 - Session 5 - Looking for a Rescue
James Thompson
 
Learn Ruby 2011 - Session 4 - Objects, Oh My!
Learn Ruby 2011 - Session 4 - Objects, Oh My!Learn Ruby 2011 - Session 4 - Objects, Oh My!
Learn Ruby 2011 - Session 4 - Objects, Oh My!
James Thompson
 
Learn Ruby 2011 - Session 3
Learn Ruby 2011 - Session 3Learn Ruby 2011 - Session 3
Learn Ruby 2011 - Session 3
James Thompson
 
Learn Ruby 2011 - Session 1
Learn Ruby 2011 - Session 1Learn Ruby 2011 - Session 1
Learn Ruby 2011 - Session 1
James Thompson
 
Learn Ruby 2011 - Session 2
Learn Ruby 2011 - Session 2Learn Ruby 2011 - Session 2
Learn Ruby 2011 - Session 2
James Thompson
 
Rails: Scaling Edition - Getting on Rails 3
Rails: Scaling Edition - Getting on Rails 3Rails: Scaling Edition - Getting on Rails 3
Rails: Scaling Edition - Getting on Rails 3
James Thompson
 
Ruby For Web Development
Ruby For Web DevelopmentRuby For Web Development
Ruby For Web Development
James Thompson
 
Introducing Ruby
Introducing RubyIntroducing Ruby
Introducing Ruby
James Thompson
 

More from James Thompson (14)

Interfaces Not Required — RubyHACK 2018
Interfaces Not Required — RubyHACK 2018Interfaces Not Required — RubyHACK 2018
Interfaces Not Required — RubyHACK 2018
 
Bounded Contexts for Legacy Code
Bounded Contexts for Legacy CodeBounded Contexts for Legacy Code
Bounded Contexts for Legacy Code
 
Beyond Accidental Arcitecture
Beyond Accidental ArcitectureBeyond Accidental Arcitecture
Beyond Accidental Arcitecture
 
Wrapping an api with a ruby gem
Wrapping an api with a ruby gemWrapping an api with a ruby gem
Wrapping an api with a ruby gem
 
Microservices for the Monolith
Microservices for the MonolithMicroservices for the Monolith
Microservices for the Monolith
 
Mocking & Stubbing
Mocking & StubbingMocking & Stubbing
Mocking & Stubbing
 
Learn Ruby 2011 - Session 5 - Looking for a Rescue
Learn Ruby 2011 - Session 5 - Looking for a RescueLearn Ruby 2011 - Session 5 - Looking for a Rescue
Learn Ruby 2011 - Session 5 - Looking for a Rescue
 
Learn Ruby 2011 - Session 4 - Objects, Oh My!
Learn Ruby 2011 - Session 4 - Objects, Oh My!Learn Ruby 2011 - Session 4 - Objects, Oh My!
Learn Ruby 2011 - Session 4 - Objects, Oh My!
 
Learn Ruby 2011 - Session 3
Learn Ruby 2011 - Session 3Learn Ruby 2011 - Session 3
Learn Ruby 2011 - Session 3
 
Learn Ruby 2011 - Session 1
Learn Ruby 2011 - Session 1Learn Ruby 2011 - Session 1
Learn Ruby 2011 - Session 1
 
Learn Ruby 2011 - Session 2
Learn Ruby 2011 - Session 2Learn Ruby 2011 - Session 2
Learn Ruby 2011 - Session 2
 
Rails: Scaling Edition - Getting on Rails 3
Rails: Scaling Edition - Getting on Rails 3Rails: Scaling Edition - Getting on Rails 3
Rails: Scaling Edition - Getting on Rails 3
 
Ruby For Web Development
Ruby For Web DevelopmentRuby For Web Development
Ruby For Web Development
 
Introducing Ruby
Introducing RubyIntroducing Ruby
Introducing Ruby
 

Recently uploaded

Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and BioinformaticiansBiomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Neo4j
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
Edge AI and Vision Alliance
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Wask
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
Tatiana Kojar
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectorsConnector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
DianaGray10
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
Alex Pruden
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
ScyllaDB
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
Postman
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
Public CyberSecurity Awareness Presentation 2024.pptx
Public CyberSecurity Awareness Presentation 2024.pptxPublic CyberSecurity Awareness Presentation 2024.pptx
Public CyberSecurity Awareness Presentation 2024.pptx
marufrahmanstratejm
 
"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota
Fwdays
 
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
Edge AI and Vision Alliance
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
saastr
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 

Recently uploaded (20)

Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and BioinformaticiansBiomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectorsConnector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
Public CyberSecurity Awareness Presentation 2024.pptx
Public CyberSecurity Awareness Presentation 2024.pptxPublic CyberSecurity Awareness Presentation 2024.pptx
Public CyberSecurity Awareness Presentation 2024.pptx
 
"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota
 
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 

Ruby Testing: Cucumber and RSpec

  • 2. WHO IS THIS GUY? James Thompson @plainprogrammer james@plainprograms.com Web Administrator & Student @ New Orleans Baptist Theological Seminary
  • 3. WHY DO WE TEST?
  • 4. WHAT DO WE TEST?
  • 6. HOW DO WE TEST?
  • 7. WHAT DO WE TEST WITH?
  • 8. WHAT IS CUCUMBER •Behavior driven development tool for Ruby •Focuses on higher level implementations such as acceptance tests •Focuses on story-style, plain English test descriptions •Follows the GWT (Given, When, Then) pattern for features
  • 9. WHAT IS RSPEC •Behavior driven development tool for Ruby •Provides a DSL for talking about what code should do
  • 10. A POSSIBLE PROCESS •Start with a feature •Define the steps for your feature •Write lower-level specs •Write code to pass specs •Rinse and Repeat until feature passes
  • 11. WRITE A FEATURE # features/calculator.feature Feature: Addition In Order to avoid silly mistakes As a math idiot I want to be told the sum of two numbers Scenario: Add two numbers Given I have entered 50 into the calculator And I have entered 70 into the calculator When I press add Then the result should be 120 on the screen
  • 12. WRITE STEPS # features/step_definitions/calculator_steps.rb Given /I have entered (.*) into the calculator/ do |n| calculator = Calculator.new calculator.push(n.to_i) end
  • 13. WRITE SPECS # spec/calculator.spec describe Calculator do before(:each) do @calculator = Calculator.new end it "should respond to push()" do @calculator.should respond_to(:push) end it "should respond to add()" do @calculator.should respond_to(:add) end end
  • 14. CODE UNTIL YOU PASS class Calculator def push(n) @args ||= [] @args << n end def add result = 0 @args.each do |n| result += n end result end end
  • 17. MORE RESOURCES cukes.info rspec.info