YoVDO

Ruby: Testing with RSpec

Offered By: LinkedIn Learning

Tags

RSpec Courses Ruby Courses Ruby on Rails Courses Software Testing Courses Behavior-driven Development (BDD) Courses Test-Driven Development Courses Testing Frameworks Courses

Course Description

Overview

Learn how to use RSpec, the Ruby testing framework that can help developers be more productive, write better code, and reduce bugs during development.

Syllabus

Introduction
  • Welcome
  • How to use the exercise files
1. Introducing RSpec
  • What is RSpec?
  • Why software tests are important
  • Thinking in user stories
  • Writing good tests
2. Installation
  • Installing Ruby and RubyGems
  • Installing RSpec
  • Configuration
3. First Steps and Concepts
  • Target code and the spec file
  • Basic syntax
  • Writing specs
  • Running specs
  • Skipping examples and working with pending examples
4. Working with Expectations
  • Fundamentals
  • A deprecated modifier: should
  • Equivalence matchers
  • Truthiness matchers
  • Numeric comparison matchers
  • Collections
  • Other useful matchers
  • Predicate matchers
  • Observation matchers
  • Complex expectations
5. Testing Efficiently
  • Helper methods
  • Hooks: before, after, and around
  • Using the let method
  • Setting a subject
  • Implicitly defined subjects
  • Shared examples
6. Test Doubles
  • What are test doubles?
  • Using mocks and stubs
  • Partial test doubles
  • Message expectations
  • Message argument constraints
  • Message count constraints
  • Spies
7. Challenges
  • Food-finder application
  • Challenge: NumberHelper
  • Solution: NumberHelper
  • Challenge: StringExtend
  • Solution: StringExtend
  • Challenge: Restaurant
  • Solution: Restaurant
  • Challenge: Guide
  • Solution: Guide
8. RSpec with Ruby on Rails
  • Installing
  • Generators
  • Test database
  • Transactional examples
  • Model specs
  • Helper specs
  • Controller specs: Requests
  • Controller specs: Responses
  • View specs
9. Test-Driven Development (TDD)
  • What is TDD?
  • A TDD example: Part one
  • A TDD example: Part two
  • A TDD example: Part three
  • A TDD example: Part four
  • Benefits and disadvantages
10. Testing Tools
  • Fixtures and factories
  • Acceptance testing
  • Automatic testing
  • Other tools
Conclusion
  • Goodbye

Taught by

Kevin Skoglund

Related Courses

Desarrollo de Aplicaciones Web: Prueba y Despliegue
University of New Mexico via Coursera
Advanced Selenium: Automation Frameworks
LinkedIn Learning
Real-life Ruby on Rails App From Scratch In 14 Hours (RSpec)
Udemy
Curso de Testes para Ruby on Rails com RSpec
Udemy
Testing Ruby with RSpec: The Complete Guide
Udemy