Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
An Introduction to Spies in RSpec
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Penelope Phippen
November 17, 2014
Technology
180
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
An Introduction to Spies in RSpec
Penelope Phippen
November 17, 2014
More Decks by Penelope Phippen
See All by Penelope Phippen
Introducing Rubyfmt
penelope_zone
0
630
How RSpec Works
penelope_zone
0
6.9k
Quick and easy browser testing using RSpec and Rails 5.1
penelope_zone
1
120
Teaching RSpec to play nice with Rails
penelope_zone
2
190
Little machines that eat strings
penelope_zone
1
140
What is processor (brighton ruby edition)
penelope_zone
0
150
What is processor?
penelope_zone
1
390
extremely defensive coding - rubyconf edition
penelope_zone
0
300
Agile, etc.
penelope_zone
2
270
Other Decks in Technology
See All in Technology
[2026-09-11]SREは誰のもの?運用エンジニアが始める 「SRE領域への越境」とチームの進化の軌跡 〜Road to NEXT CRE
tosite
0
250
絵ではじめるKubernetesセキュリティ
aoi1
3
570
日経電子版を支えていく Kasane Design System/fec_fukuoka
nikkei_engineer_recruiting
0
1.5k
Geolonia の開発現場における AIの活用について
miya0001
0
100
Amazon Quick on DesktopがIAM Identity Centerで動かない理由
yukiogawa
0
190
synctest時代のhttptest Go 1.27で変わるHTTPサーバテストの裏側 / go conference2026 synctest and httptest
budougumi0617
1
3k
aws-iot-platform-architecture-use-cases.pdf
ma2shita
0
150
研究開発部の紹介 / Sansan R&D Profile
sansan33
PRO
5
25k
The Agent Builder Loop from Daily Work to OSS
minorun365
PRO
3
200
20260912_スクフェス三河
kgnkhkr
0
380
Claude Codeを「使うほど育つ」AI秘書にするノウハウ
minorun365
PRO
27
22k
2026_devsumi_ozono.pdf
o3
3
510
Featured
See All Featured
[SF Ruby Conf 2025] Rails X
palkan
3
1.4k
Abbi's Birthday
coloredviolet
4
10k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.5k
Odyssey Design
rkendrick25
PRO
2
810
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
380
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
Faster Mobile Websites
deanohume
310
32k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
420
A Tale of Four Properties
chriscoyier
163
24k
Navigating Weather and Climate Data
rabernat
0
520
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
540
The Art of Programming - Codeland 2020
erikaheidi
57
14k
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]