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
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
150
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
データ品質を壊しながらSnowflakeのAIに分析させてみた
kawanago
0
540
LocalStack を使ったサーバーレスアプリケーション開発 / Serverless Development with LocalStack
kakakakakku
1
290
生成AIを使って「人が」考える技術 ― AI時代の人機共想と実践ノウハウ|UNITT AC2026
ishiirikie
0
560
MCPゲートウェイを作って運用してわかったこと — Agent時代の権限管理の現在地
mtpooh
10
3.2k
OpenSharing について熱く語る〜AI アセットの共有について〜
kameitomohiro
0
240
オブザーバビリティを高める AI エージェント体験を考える / Designing AI Agent Experiences That Enhance Observability
aoto
PRO
2
320
Snowflake Horizon Catalog と Apache Iceberg で作る オープンなデータ基盤
kitagawaz
0
460
AIに攻撃される前に、AIに攻撃させる
tsuchikazu
0
160
組み立てて楽しむ AWS Blocks 入門
kmiya84377
0
220
FOSS4Gを活用した自治体業務DXの試み
470715
0
120
並行性の問題を防げ!実践トランザクション入門
occhi
0
280
Codex概要
ymiya55
0
460
Featured
See All Featured
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.6k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
1
450
Site-Speed That Sticks
csswizardry
13
1.5k
Building a Scalable Design System with Sketch
lauravandoore
464
34k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6.1k
How to Talk to Developers About Accessibility
jct
2
560
Building Applications with DynamoDB
mza
96
7.2k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.6k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.7k
It's Worth the Effort
3n
188
29k
Accessibility Awareness
sabderemane
1
240
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
270
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]