Ruby Full Stack Development: Unit Testing and Behavior Driven Development


Overview/Description
Expected Duration
Lesson Objectives
Course Number
Expertise Level



Overview/Description
Testing is a critical part of software development. This course will explore the built-in unit testing features of Ruby, as well as how to use Cucumber and behavior driven development (BDD) to help with testing Ruby code. Begin by learning how to describe unit testing. Next, create and run a test unit. From there you will identify assertion types, assert numerical values, strings with patterns, and objects. As you progress, you will learn how to install Cucumber, create a scenario project with it, and setup step definitions to run a test. Finally, as an exercise, you will use unit tests and behavior driven development to verify code functionality.

Expected Duration (hours)
1.0

Lesson Objectives

Ruby Full Stack Development: Unit Testing and Behavior Driven Development

  • describe how unit testing can benefit development with Ruby
  • create and run a unit test
  • identify the different assertion types and how they can be used to test code
  • use assertions to validate numeric values
  • use assertions to validate strings or patterns in strings
  • use assertions to verify objects and object properties
  • set up and tear down prerequisites for running a unit test
  • describe behavior driven development and how it can be used for testing using Cucumber
  • install Cucumber and create a Cucumber project
  • create a scenario in a Cucumber .feature file
  • create the step definitions for a Cucumber scenario and run the test
  • use unit tests and behavior driven development to verify code functionality
  • Course Number:
    it_sddruf_05_enus

    Expertise Level
    Intermediate