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
560
How RSpec Works
penelope_zone
0
6.6k
Quick and easy browser testing using RSpec and Rails 5.1
penelope_zone
1
82
Teaching RSpec to play nice with Rails
penelope_zone
2
130
Little machines that eat strings
penelope_zone
1
99
What is processor (brighton ruby edition)
penelope_zone
0
110
What is processor?
penelope_zone
1
350
extremely defensive coding - rubyconf edition
penelope_zone
0
260
Agile, etc.
penelope_zone
2
220
Other Decks in Technology
See All in Technology
20250625 Snowflake Summit 2025活用事例 レポート / Nowcast Snowflake Summit 2025 Case Study Report
kkuv
1
410
タイミーのデータモデリング事例と今後のチャレンジ
ttccddtoki
6
2.3k
LangSmith×Webhook連携で実現するプロンプトドリブンCI/CD
sergicalsix
1
200
WordPressから ヘッドレスCMSへ! Storyblokへの移行プロセス
nyata
0
430
AIの全社活用を推進するための安全なレールを敷いた話
shoheimitani
2
320
KubeCon + CloudNativeCon Japan 2025 Recap by CA
ponkio_o
PRO
0
290
AI導入の理想と現実~コストと浸透〜
oprstchn
0
190
改めてAWS WAFを振り返る~業務で使うためのポイント~
masakiokuda
2
230
自律的なスケーリング手法FASTにおけるVPoEとしてのアカウンタビリティ / dev-productivity-con-2025
yoshikiiida
1
14k
Backlog ユーザー棚卸しRTA、多分これが一番早いと思います
__allllllllez__
1
130
Zero Data Loss Autonomous Recovery Service サービス概要
oracle4engineer
PRO
2
7.7k
Model Mondays S2E03: SLMs & Reasoning
nitya
0
330
Featured
See All Featured
Navigating Team Friction
lara
187
15k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
48
5.4k
The Power of CSS Pseudo Elements
geoffreycrofte
77
5.8k
Thoughts on Productivity
jonyablonski
69
4.7k
It's Worth the Effort
3n
185
28k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
138
34k
Automating Front-end Workflow
addyosmani
1370
200k
BBQ
matthewcrist
89
9.7k
VelocityConf: Rendering Performance Case Studies
addyosmani
332
24k
Writing Fast Ruby
sferik
628
62k
The World Runs on Bad Software
bkeepers
PRO
69
11k
Unsuck your backbone
ammeep
671
58k
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]