Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
An Introduction to Spies in RSpec
Search
Penelope Phippen
November 17, 2014
Technology
0
170
An Introduction to Spies in RSpec
Penelope Phippen
November 17, 2014
Tweet
Share
More Decks by Penelope Phippen
See All by Penelope Phippen
Introducing Rubyfmt
penelope_zone
0
590
How RSpec Works
penelope_zone
0
6.7k
Quick and easy browser testing using RSpec and Rails 5.1
penelope_zone
1
96
Teaching RSpec to play nice with Rails
penelope_zone
2
150
Little machines that eat strings
penelope_zone
1
110
What is processor (brighton ruby edition)
penelope_zone
0
130
What is processor?
penelope_zone
1
370
extremely defensive coding - rubyconf edition
penelope_zone
0
280
Agile, etc.
penelope_zone
2
240
Other Decks in Technology
See All in Technology
生成AI時代におけるグローバル戦略思考
taka_aki
0
190
今からでも間に合う!速習Devin入門とその活用方法
ismk
1
720
MapKitとオープンデータで実現する地図情報の拡張と可視化
zozotech
PRO
1
140
Reinforcement Fine-tuning 基礎〜実践まで
ch6noota
0
190
文字列の並び順 / Unicode Collation
tmtms
3
590
Sansanが実践する Platform EngineeringとSREの協創
sansantech
PRO
2
880
新 Security HubがついにGA!仕組みや料金を深堀り #AWSreInvent #regrowth / AWS Security Hub Advanced GA
masahirokawahara
1
2.1k
5分で知るMicrosoft Ignite
taiponrock
PRO
0
380
Python 3.14 Overview
lycorptech_jp
PRO
1
120
プロンプトやエージェントを自動的に作る方法
shibuiwilliam
11
9.3k
業務のトイルをバスターせよ 〜AI時代の生存戦略〜
staka121
PRO
2
200
RAG/Agent開発のアップデートまとめ
taka0709
0
180
Featured
See All Featured
It's Worth the Effort
3n
187
29k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.2k
The Cost Of JavaScript in 2023
addyosmani
55
9.4k
Embracing the Ebb and Flow
colly
88
4.9k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.8k
Rebuilding a faster, lazier Slack
samanthasiow
84
9.3k
Building Applications with DynamoDB
mza
96
6.8k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
710
The Pragmatic Product Professional
lauravandoore
37
7.1k
KATA
mclloyd
PRO
33
15k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.8k
Transcript
An Introduction to Spies in RSpec
a!/samphippen
Feel free to ask Questions
Testing
We are the people that test the code
Why do we test our code?
x`
None
Tests help us find bugs
and then never see them again
Some tests provide design feedback on our code
Kinds of test
Integrated test Fake nothing
Isolated test Fake everything
and a spectrum in between
Why do we fake things?
None
Kinds of fake
Stub Fake a response to some method call
Mock Expect a method will be called in the future
Spy Record calls made and then assert after the fact
Let’s write some tests
x
Let’s have some questions !!/samphippen
[email protected]
Feel free to ask Questions
RSpec RSpec ! ! RSpec 3
Let’s have some questions a!/samphippen
[email protected]