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
Taming Chaotic Specs: RSpec Design Patterns
Search
Adam Cuppy (he/him)
April 25, 2014
Technology
360
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Taming Chaotic Specs: RSpec Design Patterns
RailsConf 2014 Workshop on Rspec
Adam Cuppy (he/him)
April 25, 2014
Transcript
17 slides
www.codingzeal.com @adamcuppy Adam Cuppy
October 22 - 25 Agile TDD Developers Training & Conference
RogueRails.com
Control values with! `let()`
Descriptive Naming
let(:user1) { … } let(:user2) { … }
it { expect(user1).to be_valid } it { expect(user2).to be_valid }
let(:user_with_company) { … } let(:user_without_company) { … }
it { expect(user_with_company).to be_valid } it { expect(user_without_company).to be_valid }
Start from a Minimum Valid Object
it { object.valid?.should_not be_true }
it { expect(object).not_to be_valid }
it { expect(object).to be_invalid }
Permutations! using `context`s
Extract Common Behaviors
Declarative Expectations
October 22 - 25 Agile TDD Developers Training & Conference
RogueRails.com
Thank You!
More Decks by Adam Cuppy (he/him)
See All by Adam Cuppy (he/him)
Mentorship in Three Acts
acuppy
0
160
Mechanically Confident
acuppy
1
190
Pluck It - Southeast Ruby 2017
acuppy
1
160
Trust Me - Rocky Mountain Ruby 2017
acuppy
0
130
Brighton Ruby 2017 - Difficult Conversations
acuppy
1
110
GoRuCo 2017 - Difficult Conversations
acuppy
0
160
GORUCO - Cult(ure)
acuppy
0
120
#RailsPacific - Taming Chaotic Specs - RSpec Design Patterns
acuppy
5
1.1k
#RailsPacific - [NOTES] Taming Chaotic Specs - RSpec Design Patterns
acuppy
1
260
Other Decks in Technology
See All in Technology
2026-11-16 JAWS-UG コンテナ支部 #31 ゆるLT大会 ECR のライフサイクルポリシーを いい感じに設定したい / ECR Lifecycle policy
masasuzu
3
570
Terraform 0 to 100:100個以上のリポジトリを常に最新にし続けるための自動化
sue445
2
940
飯から始まるデータエンジニア
sansantech
PRO
0
110
E2E Test というハーネス — AI時代の自動テスト民主化
daishukojima
10
5.8k
CloudTrail を推したい
kazzpapa3
1
150
re:Inventを楽しむために、 1日1つ「これが楽しみ」を決めよう
beli68
0
120
RAGの改善を速く回すための評価基盤
yosukeyoshida
6
3.3k
アラートを見直していたら営業組織への理解にちょっとだけ繋がった話
z63d
1
210
こんなに変わった! AWSネットワークの常識
shotashiratori
16
11k
農家は秘伝のタレを知らない - NOBODY KNOWS THE HIDDEN SOURCE - Kaggriculture 3rd Place Solution
masspeaks
3
550
市販IoT機器や自作IoT機器とHomeAssistantを駆使して家の電気代をできる限り見える化する方法の考案
harutiro
0
390
_マネジメントする人される人ナイト_2026__良いチームを作っていきたい_お気持ち_.pdf
xkxaxkx
0
820
Featured
See All Featured
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.3k
A Tale of Four Properties
chriscoyier
163
24k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
2
3k
Speed Design
sergeychernyshev
33
2.2k
Odyssey Design
rkendrick25
PRO
3
960
Docker and Python
trallard
47
4.3k
Become a Pro
speakerdeck
PRO
31
6.4k
Why You Should Never Use an ORM
jnunemaker
PRO
61
10k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
640
Producing Creativity
orderedlist
PRO
348
41k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.5k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.4k