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
·
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
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
610
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
170
Little machines that eat strings
penelope_zone
1
130
What is processor (brighton ruby edition)
penelope_zone
0
140
What is processor?
penelope_zone
1
380
extremely defensive coding - rubyconf edition
penelope_zone
0
290
Agile, etc.
penelope_zone
2
250
Other Decks in Technology
See All in Technology
データ分析基盤の信頼を支える視点と設計
yuki_saito
2
760
地元にいないローカルオーガナイザーの立ち回り
uvb_76
1
320
A Harness for Behaviour: how to get AI to generate code that does what we intend, or "TDD in the age of AI"
xpmatteo
0
500
Typiaで配信JSONの安全性を構造的に担保する(TSKaigi2026)
righttouch
PRO
1
200
long-running-tasks
cipepser
2
440
Cloud Run のアップデート 触ってみる&紹介
gre212
0
220
Generative UI × A2UI で AI エージェントを作った話 AI-DLC も使ってみた!
kmiya84377
1
270
Platform engineering for developers, architects & the rest of us (AI agents)
danielbryantuk
0
120
layerx-fde-practices
cipepser
6
2.9k
海外カンファレンス「JavaOne」参加レポート ユーザー系IT企業における目的・成果/JavaOne Report Purpose and Results in the User IT Company
muit
0
110
GitHub Copilot CLI の Rubber Duck 機能を使ってコーディングの品質をあげよう #techbaton_findy
stefafafan
2
1.2k
マーケットプレイス版Oracle WebCenter Content For OCI
oracle4engineer
PRO
5
1.7k
Featured
See All Featured
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
290
Thoughts on Productivity
jonyablonski
76
5.2k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.5k
The Curse of the Amulet
leimatthew05
1
12k
Accessibility Awareness
sabderemane
1
130
Measuring & Analyzing Core Web Vitals
bluesmoon
9
840
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
130
Ethics towards AI in product and experience design
skipperchong
2
290
Designing for Performance
lara
611
70k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
800
WENDY [Excerpt]
tessaabrams
11
38k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
710
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]