最新消息:请大家多多支持

Testing Ruby With Rspec: The Complete Guide

其他教程 dsgsd 120浏览 0评论

Last updated 8/2022
MP4 | Video: h264, 1280×720 | Audio: AAC, 44.1 KHz
Language: English | Size: 1.89 GB | Duration: 7h 33m

Master the art of test driven development (TDD) in Ruby using the RSpec Gem. No previous testing experience needed!

What you’ll learn
Master the syntax and structure of RSpec, the most popular Ruby Gem for testing
Utilize test-driven development principles to design and implement clean test specs in Ruby
Explore the wide collection of RSpec matchers available to test your code
Reduce dependencies in your test suite by mocking objects with class and instance doubles
Requirements
Intermediate knowledge of the Ruby programming language (classes, objects, blocks, etc)
Modern version of Ruby (>3.0)
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 language. 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. Tests give you the confidence to refactor existing code because you know that you will honor the original purpose of the code. The benefits of testing extend outside of your codebase. In this course, we’ll cover test-driven development (TDD), a methodology in which we write our tests first, before the implementation. Test-driven development often leads to simpler, more decoupled code. Thus, testing can 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 RSpec essentials and proceeds to more complex topics including:InstallationProject InitializationTest-Driven Development (TDD)let variablesbefore and after HooksSubjectsShared ExamplesShared ContextBuilt-in MatchersMocks and DoublesInstance DoublesClass DoublesAs a software engineer and consultant who’s worked with Ruby for 5+ 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!

Overview

Section 1: Introduction

Lecture 1 Welcome to RSpec

Lecture 2 About Me

Lecture 3 Unit Tests vs End-to-End (E2E) Tests

Lecture 4 Setup Ruby on macOS Computers

Lecture 5 Setup Ruby on Windows Computers

Lecture 6 Install RSpec

Lecture 7 Install Visual Studio Code for macOS

Lecture 8 Start a Project with rspec –init

Lecture 9 Download Course Files (Optional)

Lecture 10 Test-Driven Development

Lecture 11 The describe Method

Lecture 12 The it Method

Lecture 13 The expect and eq Methods

Lecture 14 Reading Failures

Lecture 15 Making the Specs Pass

Lecture 16 Multiple Examples in Example Group

Lecture 17 Fixing Failing Specs Again

Lecture 18 Reducing Duplication – Before Hooks and Instance Variables

Lecture 19 Reducing Duplication: Helper Methods

Lecture 20 Problems With Mutation

Lecture 21 Reducing Duplication: The let Method

Lecture 22 Custom Error Messages

Lecture 23 The context Method and Nested Describes

Lecture 24 before and after Hooks

Lecture 25 Nested Logic: Hooks

Lecture 26 Nested Logic: Overwriting Let Variables

Section 2: Subjects, Shared Examples, and Shared Context

Lecture 27 Implicit Subject

Lecture 28 Explicit Subject

Lecture 29 described_class

Lecture 30 One-Liner-Example-Syntax

Lecture 31 Shared Examples with include_examples

Lecture 32 Shared Context with include_context

Section 3: Built-In Matchers

Lecture 33 The not_to Method

Lecture 34 Equality Matchers I (eq and eql)

Lecture 35 Equality Matchers II (equal and be)

Lecture 36 Comparison Matchers

Lecture 37 Predicate Matchers

Lecture 38 all Matcher

Lecture 39 be Matcher (Truthy, Falsy and Nil Values)

Lecture 40 change Matcher

Lecture 41 contain_exactly Matcher

Lecture 42 start_with and end_with Matchers

Lecture 43 have_attributes Matcher

Lecture 44 include Matcher

Lecture 45 raise_error Matcher

Lecture 46 respond_to Matcher

Lecture 47 satisfy Matcher

Lecture 48 not_to Method

Lecture 49 Compound Expectations

Section 4: Mocks

Lecture 50 Create a Test Double

Lecture 51 Set up Our Test Movie

Lecture 52 Replacing an Object with a Double

Lecture 53 Receive Counts

Lecture 54 The allow Method

Lecture 55 Matching Arguments

Lecture 56 Instance Doubles

Lecture 57 Class Doubles

Lecture 58 Spies I

Lecture 59 Spies II

Section 5: Conclusion

Lecture 60 Conclusion

Lecture 61 Bonus!

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


Password/解压密码www.tbtos.com

资源下载此资源仅限VIP下载,请先

转载请注明:0daytown » Testing Ruby With Rspec: The Complete Guide

您必须 登录 才能发表评论!