Using and_raise when Mocking in RSpec | Additional Behaviors Explained

  Рет қаралды 336

Brett Codes

Brett Codes

Күн бұрын

When testing Ruby code with RSpec, the code under test may do more than just return a value. It could raise an error, throw something, or yield a block. This screencast looks at how to mock those behaviors with Rspec.
Source code: github.com/bre...
Dependency versions:
Ruby 3.1.1
RSpec 3.11.0
RSpec docs: relishapp.com/...

Пікірлер
RSpec Argument Matchers Explained
23:36
Brett Codes
Рет қаралды 307
RSpec spec_helper vs rails_helper Explained
20:27
Brett Codes
Рет қаралды 854
Cheerleader Transformation That Left Everyone Speechless! #shorts
00:27
Fabiosa Best Lifehacks
Рет қаралды 16 МЛН
The Differences Between Average and Great Developers
11:08
Brett Codes
Рет қаралды 219
RSpec Shared Example Groups | DRY Up Your Specs
20:18
Brett Codes
Рет қаралды 666
Two Sum III - Data Structure Design
5:44
Owen Wu
Рет қаралды 3
Productivity for Ambitious Developers | Do Your Best Work
31:33
Ruby for game development? Is this a joke?
8:41
Brett Codes
Рет қаралды 8 М.
Requiring Ruby Files in RSpec Dynamically
8:15
Brett Codes
Рет қаралды 173
Episode 45: Lead by Letting Go: Empowering Success and Failure
17:48
The Leading Lounge
Рет қаралды 301
How to Write RSpec Helper Methods
13:47
Brett Codes
Рет қаралды 384