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
150
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
500
How RSpec Works
penelope_zone
0
6.3k
Quick and easy browser testing using RSpec and Rails 5.1
penelope_zone
1
75
Teaching RSpec to play nice with Rails
penelope_zone
2
120
Little machines that eat strings
penelope_zone
1
79
What is processor (brighton ruby edition)
penelope_zone
0
92
What is processor?
penelope_zone
1
340
extremely defensive coding - rubyconf edition
penelope_zone
0
230
Agile, etc.
penelope_zone
2
200
Other Decks in Technology
See All in Technology
KubeCon EU 2024 Recap “Kubernetes Policy Time Machine: Where to Next?”
ryysud
0
200
4年前、あるじゃん老害エンジニアLT合戦に登壇、米国西海岸コンピュータ歴史博物館体験記の続編
toshi_atsumi
0
220
Janus
bkuhlmann
1
490
コンパウンドスタートアップのためのスケーラブルでセキュアなInfrastructure as Codeパイプラインを考える / Scalable and Secure Infrastructure as Code Pipeline for a Compound Startup
yuyatakeyama
4
4.7k
現代CSSフレームワークの内部実装とその仕組み
poteboy
8
3.6k
API Gatewayと少し仲良くなってみた!
masuchoku
0
100
ユーザーストーリーのレビューを自動化したみたの
bun913
1
410
EMとして2023年度に頑張ったこと / What we did well in FY2023 as a EM
pauli
1
160
Next'24 事例セッションの紹介とクラウド資格を活用したキャリア形成について語りMuscle
yasumuusan
1
430
継続的な改善 x ⾮連続的な進化
sansantech
PRO
3
140
VS CodeでAWSを操作しよう
smt7174
7
1.6k
Cracking the KubeCon CfP
inductor
2
230
Featured
See All Featured
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
17
1.4k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
501
140k
Creatively Recalculating Your Daily Design Routine
revolveconf
210
11k
How GitHub (no longer) Works
holman
304
140k
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
Infographics Made Easy
chrislema
238
18k
Large-scale JavaScript Application Architecture
addyosmani
504
110k
RailsConf 2023
tenderlove
4
540
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
6
1.5k
Imperfection Machines: The Place of Print at Facebook
scottboms
260
12k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
187
16k
The Illustrated Children's Guide to Kubernetes
chrisshort
31
46k
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]