Udemy
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
Development
Web Development Data Science Mobile Development Programming Languages Game Development Database Design & Development Software Testing Software Engineering Development Tools No-Code Development
Business
Entrepreneurship Communications Management Sales Business Strategy Operations Project Management Business Law Business Analytics & Intelligence Human Resources Industry E-Commerce Media Real Estate Other Business
Finance & Accounting
Accounting & Bookkeeping Compliance Cryptocurrency & Blockchain Economics Finance Finance Cert & Exam Prep Financial Modeling & Analysis Investing & Trading Money Management Tools Taxes Other Finance & Accounting
IT & Software
IT Certification Network & Security Hardware Operating Systems Other IT & Software
Office Productivity
Microsoft Apple Google SAP Oracle Other Office Productivity
Personal Development
Personal Transformation Personal Productivity Leadership Career Development Parenting & Relationships Happiness Esoteric Practices Religion & Spirituality Personal Brand Building Creativity Influence Self Esteem & Confidence Stress Management Memory & Study Skills Motivation Other Personal Development
Design
Web Design Graphic Design & Illustration Design Tools User Experience Design Game Design Design Thinking 3D & Animation Fashion Design Architectural Design Interior Design Other Design
Marketing
Digital Marketing Search Engine Optimization Social Media Marketing Branding Marketing Fundamentals Marketing Analytics & Automation Public Relations Advertising Video & Mobile Marketing Content Marketing Growth Hacking Affiliate Marketing Product Marketing Other Marketing
Lifestyle
Arts & Crafts Beauty & Makeup Esoteric Practices Food & Beverage Gaming Home Improvement Pet Care & Training Travel Other Lifestyle
Photography & Video
Digital Photography Photography Portrait Photography Photography Tools Commercial Photography Video Design Other Photography & Video
Health & Fitness
Fitness General Health Sports Nutrition Yoga Mental Health Dieting Self Defense Safety & First Aid Dance Meditation Other Health & Fitness
Music
Instruments Music Production Music Fundamentals Vocal Music Techniques Music Software Other Music
Teaching & Academics
Engineering Humanities Math Science Online Education Social Science Language Teacher Training Test Prep Other Teaching & Academics
AWS Certification Microsoft Certification AWS Certified Solutions Architect - Associate AWS Certified Cloud Practitioner CompTIA A+ Cisco CCNA Amazon AWS CompTIA Security+ AWS Certified Developer - Associate
Graphic Design Photoshop Adobe Illustrator Drawing Digital Painting InDesign Character Design Canva Figure Drawing
Life Coach Training Neuro-Linguistic Programming Personal Development Mindfulness Meditation Personal Transformation Life Purpose Emotional Intelligence Neuroscience
Web Development JavaScript React CSS Angular PHP WordPress Node.Js Python
Google Flutter Android Development iOS Development Swift React Native Dart Programming Language Mobile Development Kotlin SwiftUI
Digital Marketing Google Ads (Adwords) Social Media Marketing Google Ads (AdWords) Certification Marketing Strategy Internet Marketing YouTube Marketing Email Marketing Google Analytics
SQL Microsoft Power BI Tableau Business Analysis Business Intelligence MySQL Data Modeling Data Analysis Big Data
Business Fundamentals Entrepreneurship Fundamentals Business Strategy Online Business Business Plan Startup Blogging Freelancing Home Business
Unity Game Development Fundamentals Unreal Engine C# 3D Game Development C++ 2D Game Development Unreal Engine Blueprints Blender
30-Day Money-Back Guarantee
Development Programming Languages RSpec

Testing Ruby with RSpec: The Complete Guide

Master the art of test driven development (TDD) in Ruby using the RSpec Gem. No previous testing experience needed!
Bestseller
Rating: 4.6 out of 54.6 (736 ratings)
15,206 students
Created by Boris Paskhaver
Last updated 9/2020
English
English [Auto]
30-Day Money-Back Guarantee

What you'll learn

  • Utilize test-driven development principles to design and implement clean test specs in Ruby
  • Master the syntax and structure of RSpec, the most popular Ruby Gem for testing
  • Reduce dependencies in your test suite by mocking objects with class and instance doubles
  • Explore the wide collection of RSpec matchers available to test your code
Curated for the Udemy for Business collection

Course content

5 sections • 60 lectures • 7h 31m total length

  • Preview13:03
  • About Me
    00:56
  • Unit Tests vs End-to-End (E2E) Tests
    09:16
  • Setup rbenv / Ruby on MacOS
    01:07
  • Installing RSpec
    03:11
  • Installing Visual Studio Code for MacOS
    00:48
  • Starting a Project with rspec --init
    10:17
  • Download Course Files (Optional)
    00:28
  • Test-Driven Development
    05:28
  • The describe Method
    04:42
  • The it Method
    05:33
  • The expect and eq Methods
    08:01
  • The describe, it and expect Methods
    1 question
  • Reading Failures
    07:29
  • Making the Specs Pass
    08:57
  • QUIZ: TDD and RSpec Methods
    9 questions
  • Multiple Examples in Example Group
    08:01
  • Fixing Failing Specs Again
    08:23
  • Making Specs Pass
    1 question
  • Reducing Duplication - Before Hooks and Instance Variables
    10:58
  • Reducing Duplication: Helper Methods
    04:12
  • Problems With Mutation
    06:03
  • Reducing Duplication: The let Method
    15:05
  • Custom Error Messages
    04:39
  • QUIZ: Removing Duplication
    5 questions
  • The context Method and Nested Describes
    08:17
  • before and after Hooks
    09:07
  • Nested Logic: Hooks
    Preview12:00
  • Single Context Hooks
    1 question
  • Multi-Context Hooks
    1 question
  • Nested Logic: Overwriting Let Variables
    08:53

  • Implicit Subject
    07:37
  • Implicit Subject
    3 questions
  • Explicit Subject
    05:38
  • Explicit Subject
    1 question
  • described_class
    06:13
  • One-Liner-Example-Syntax
    05:07
  • Preview10:11
  • Shared Context with include_context
    07:34
  • Subjects, Shared Examples, and Shared Context
    5 questions

  • The not_to Method
    04:38
  • Equality Matchers I (eq and eql)
    05:30
  • Equality Matchers II (equal and be)
    09:50
  • Comparison Matchers
    Preview06:03
  • Equality and Comparison Matchers
    6 questions
  • Predicate Matchers
    07:45
  • all Matcher
    06:20
  • be Matcher (Truthy, Falsy and Nil Values)
    07:23
  • Predicate, all and be Matchers
    4 questions
  • change Matcher
    10:02
  • contain_exactly Matcher
    04:06
  • start_with and end_with Matchers
    06:00
  • have_attributes Matcher
    04:35
  • include Matcher
    06:16
  • raise_error Matcher
    09:11
  • respond_to Matcher
    09:01
  • satisfy Matcher
    09:42
  • not_to Method
    08:21
  • Compound Expectations
    06:17
  • Compound Expectations
    3 questions

  • Create a Test Double
    15:37
  • Doubles
    2 questions
  • Set up Our Test Movie
    08:44
  • Replacing an Object with a Double
    12:32
  • Receive Counts
    07:26
  • The allow Method
    11:48
  • Matching Arguments
    10:33
  • Instance Doubles
    13:37
  • Class Doubles
    13:23
  • Spies I
    08:16
  • Spies II
    09:44

  • Conclusion
    01:05
  • Bonus!
    00:17

Requirements

  • Intermediate knowledge of the Ruby programming language (classes, objects, data structures, etc)
  • Modern version of Ruby (>2.4)
  • Text editor (VSCode is recommended)

Description

Welcome to Testing Ruby with RSpec: The Complete Guide!

This course offers a comprehensive overview of the RSpec testing library for the Ruby programming library. RSpec is the most popular Ruby Gem of all time, with over 300 million downloads to date.

If you're new to the topic, testing is the practice of "writing code that confirms that other code works as expected". Tests control for regressions, which are changes to the code that break the program.

The benefits of testing extend outside of the codebase. Adopting a test-driven approach will also make you a better developer. Tests force you to think critically about the program and its features: the classes, the objects, the methods and more.

Testing Ruby with RSpec begins with the essentials and proceeds to more complex topics including:

  • Installation

  • Project Initialization

  • Test-Driven Development (TDD)

  • let variables

  • before and after Hooks

  • Subjects

  • Shared Examples

  • Shared Context

  • Built-in Matchers

  • Mocks and Doubles

  • Instance Doubles

  • Class Doubles

As a software engineer and consultant who's worked with Ruby for several years, I'm excited to introduce you to the awesome RSpec library, its elegant syntax, and all of its fun quirks.

Thanks for checking out the course!

Who this course is for:

  • Intermediate Ruby developers interested in upgrading their skill set
  • Programmers who want to explore the fundamentals of testing and TDD

Featured review

Gayan Jayasundara
Gayan Jayasundara
33 courses
10 reviews
Rating: 5.0 out of 5a year ago
I'm new to RSpec. I got a better and solid understanding of Rspec using this course. I feel confident and now I'm adding the test to code. I like Boris teaching methods which are fast and to the point with separation of each section. Personally, I'm not a fan of 20+ hours Udemy courses with more than 20mins lengthy video. Highly recommend to RSpec newbies. Thanks

Instructor

Boris Paskhaver
Software Engineer | Consultant | Author
Boris Paskhaver
  • 4.6 Instructor Rating
  • 24,277 Reviews
  • 293,087 Students
  • 6 Courses

Hi there, it's nice to meet you! I'm a New York City-based software engineer, author, and consultant who's been teaching on Udemy since 2016.

Like many of my peers, I did not follow a conventional approach to my current role as a web developer. After graduating from New York University in 2013 with a degree in Business Economics and Marketing, I worked as a business analyst, systems administrator, and data analyst for a variety of companies including a digital marketing agency, a financial services firm, and an international tech powerhouse. At one of those roles, I was fortunate enough to be challenged to build several projects with Python and JavaScript. 

There was no formal computer science education for me; I discovered coding entirely by accident. A small work interest quickly blossomed into a passionate weekend hobby. Eventually, I left my former role to complete App Academy, a rigorous full-stack web development bootcamp in NYC. The rest is history.

I've always been fascinated by the intersection of technology and education, especially since I've struggled with many of the traditional resources people use to learn how to program. My goal as an instructor is to create comprehensive step-by-step courses that break down the complex details into small, digestible pieces. I like to build the kind of material that I myself would have loved to have when I was starting out.

I'm passionate about teaching and would love to help you discover what code can do for you. See you in a course soon!

  • Udemy for Business
  • Teach on Udemy
  • Get the app
  • About us
  • Contact us
  • Careers
  • Blog
  • Help and Support
  • Affiliate
  • Impressum Kontakt
  • Terms
  • Privacy policy
  • Cookie settings
  • Sitemap
  • Featured courses
Udemy
© 2021 Udemy, Inc.