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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
620
How RSpec Works
penelope_zone
0
6.8k
Quick and easy browser testing using RSpec and Rails 5.1
penelope_zone
1
110
Teaching RSpec to play nice with Rails
penelope_zone
2
180
Little machines that eat strings
penelope_zone
1
130
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
260
Other Decks in Technology
See All in Technology
SRE Lounge Hiroshimaへの招待
grimoh
0
640
「最後に責任を取るのはチーム」— 人間のPRレビューを最小化してアップデートしたメンタルモデル
jnishime_dresscode
0
500
関数型の考えを TypeScript に持ち込んで、テストしやすい純粋関数を増やす / Pure at the Core, Effects at the Edge: Bringing Functional Thinking into TypeScript
kaminashi
1
110
ゼロをイチにする仕事が終わったあと
smasato
0
330
ローカルLLMとLINE Botの組み合わせ その3 / LINE DC Generative AI Meetup #8
you
PRO
0
130
End-to-Endで考える信頼性 —LINEアプリにおけるクライアント開発×SRE連携の実践
maruloop
4
4.1k
Empower GenAI with Agile - あなたのアジャイルが生成AIのバフになる仕組み
hageyahhoo
1
170
DMM.com 購入改善推進チーム におけるCodeRabbitを用いた レビューフロー改善の一例
ysknsid25
2
620
AI時代のエンジニアキャリアについて今一度考える
sakamoto_582
2
1.5k
Road to SRE NEXTの今までとこれから
hiroyaonoe
0
290
Zoom2Youtube.Claude
kawaguti
PRO
3
490
「早く出す」より「事業に効く」 ── 顧客の業務サイクルから逆算するAI時代の二重ループ開発と「変化の設計者」 / devsumi2026
rakus_dev
1
190
Featured
See All Featured
Typedesign – Prime Four
hannesfritz
42
3.1k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
890
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
72
40k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
410
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
760
KATA
mclloyd
PRO
35
15k
Discover your Explorer Soul
emna__ayadi
2
1.2k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
410
Side Projects
sachag
455
43k
Writing Fast Ruby
sferik
630
63k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
390
Speed Design
sergeychernyshev
33
1.9k
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]