Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
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
160
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
570
How RSpec Works
penelope_zone
0
6.6k
Quick and easy browser testing using RSpec and Rails 5.1
penelope_zone
1
85
Teaching RSpec to play nice with Rails
penelope_zone
2
140
Little machines that eat strings
penelope_zone
1
110
What is processor (brighton ruby edition)
penelope_zone
0
120
What is processor?
penelope_zone
1
360
extremely defensive coding - rubyconf edition
penelope_zone
0
270
Agile, etc.
penelope_zone
2
230
Other Decks in Technology
See All in Technology
Where will it converge?
ibknadedeji
0
180
ZOZOのAI活用実践〜社内基盤からサービス応用まで〜
zozotech
PRO
0
180
Why React!?? Next.jsそしてReactを改めてイチから選ぶ
ypresto
10
4.5k
バイブコーディングと継続的デプロイメント
nwiizo
2
430
KMP の Swift export
kokihirokawa
0
330
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
9k
Green Tea Garbage Collector の今
zchee
PRO
2
390
リーダーになったら未来を語れるようになろう/Speak the Future
sanogemaru
0
280
stupid jj tricks
indirect
0
8k
From Prompt to Product @ How to Web 2025, Bucharest, Romania
janwerner
0
120
Azure SynapseからAzure Databricksへ 移行してわかった新時代のコスト問題!?
databricksjapan
0
140
o11yで育てる、強い内製開発組織
_awache
3
120
Featured
See All Featured
[RailsConf 2023] Rails as a piece of cake
palkan
57
5.9k
Documentation Writing (for coders)
carmenintech
75
5k
Why Our Code Smells
bkeepers
PRO
339
57k
GraphQLとの向き合い方2022年版
quramy
49
14k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
132
19k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
960
Context Engineering - Making Every Token Count
addyosmani
5
190
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
252
21k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.5k
Fireside Chat
paigeccino
40
3.7k
How to Ace a Technical Interview
jacobian
280
24k
Stop Working from a Prison Cell
hatefulcrawdad
271
21k
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]