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
Teaching RSpec to play nice with Rails
Search
Penelope Phippen
April 25, 2017
Technology
190
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Teaching RSpec to play nice with Rails
Presented at Railsconf 2017. Video here:
https://www.youtube.com/watch?v=jyPfrK1y1nc
Penelope Phippen
April 25, 2017
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
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
Extremely Defensive Coding
penelope_zone
0
150
Other Decks in Technology
See All in Technology
DevelopersIO 2026 知識の地図を描く ─ オントロジーとは何か?
ishikawa_satoru
1
240
DWH の限界突破! AI エージェント向け爆速リアルタイムデータ基盤 ClickHouse
jozono
1
240
AgentCoreで実践するハーネスエンジニアリング
yakumo
1
290
React Nativeでの OTA Updateって、 どう説明する?
ichiki1023
0
150
[2026-09-30]ロックンロールは鳴り止まないっ - 信頼性かまってちゃん - 「データ駆動を投げ捨ててまで。」追いかける信頼性改善に向けた取り組みの話
tosite
0
210
生成AIを使って「人が」考える技術 ― AI時代の人機共想と実践ノウハウ|UNITT AC2026
ishiirikie
0
560
不可逆な意思決定を避けながら10億超の顧客データを AI Ready にするデータ基盤設計
baseballyama
1
160
AI時代のAPI開発を加速する品質ガードレール / API Quality Guardrails in the AI Era
yokawasa
0
160
Datadog の学び方 - あるいは、オブザーバビリティを学ぶとは何か
mananyuki
1
500
ビジネスを止めない技術的負債の返済のための戦略とその手法 - 技術的負債と向き合う / Complexity and Simplicity
soudai
PRO
3
660
オンラインゲームのシステム全体像 - コロプラ 2026年度 新卒研修
colopl
0
900
検証フェーズはAIの回答を判断するための学習機会
toru_kubota
2
510
Featured
See All Featured
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
450
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
270
Six Lessons from altMBA
skipperchong
29
4.5k
Crafting Experiences
bethany
1
370
sira's awesome portfolio website redesign presentation
elsirapls
0
440
Unsuck your backbone
ammeep
672
58k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
460
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
320
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
2
460
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
390
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
2
6.3k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
480
Transcript
Teaching RSpec to play nice with Rails @samphippen
Friends, it’s good to be back
Last year I had a life threatening illness
None
A precious bag of ceftriaxone, saving my life
None
Thanks @searls
Thanks @searls #samphippenisjustin searlsconfirmed
5.1
Yes*
ActionChatbox::TestCase
ActionDispatch ::BeliefSystemTestCase
Have some faith in us
5.1 has not been released yet
No changes required by you
Released soon in 3.6.0
No system test integration
but I would welcome a PR
RSpec + Rails
RSpec
RSpec isn’t a monolith
gem “rspec”, “~> 3.5”
Does nothing on it’s own
None
None
None
None
Internal shared code
rspec-rails
None
None
RSpec Rails
RSpec Rails our code Your rails version
gem “rspec”, “~> 3.5” gem “rspec-rails”, “~> 3.5”
gem “rspec-rails”, “~> 3.5”
Rails
Rails is a big complicated library
RSpec is extremely permissive about rails versions
>= 3.0
None
None
None
Don’t ask
5
RSpec’s rails 5 compatability was not a smooth ride
Lesson 1: 5.0 means they break things
None
None
None
None
None
Let’s just make sure this works with RSpec
None
View specs don’t work
Specifically path helpers
None
None
Switch back to working version of rails
None
Work out what changed
controller .singleton_class .ancestors
None
None
So we lost 3 random anonymous modules
WTF even are they?
actionpack-5.0.0.beta2/ lib/action_dispatch/ routing/route_set.rb:283
At this point we call in an emergency rails maintainer
None
None
None
This is a huge win for collaboration
Lesson 2: Some bugs are in Rails
None
What the hell is a signed cookie?
None
None
None
None
None
So now the fun begins
git clone rails/rails
Point the app at that rails clone
git bisect bad
git checkout v4.2.0.beta4
git bisect good
None
None
None
and then I left it for a while
and went to Rubyconf
“You have a breaking commit sha? Show me”
None
None
None
“can be replicated purely with Rails using public API”
There exists a twisty turny maze of dependencies
Before filling an issue on a gem, check it’s not
in a dep
Lesson 3: Sometimes you can’t call in @sgrif
None
None
None
None
“I made a short screencast”
None
None
Do the bisect shimmy and shake
None
None
None
None
Explaining a lot of context in a PR message is
super useful
None
Gets merged!
None
It is fine to poke a maintainer to close an
issue once they’ve fixed it
Summary
A lot of bugs that appear in RSpec can be
because of rails
Literally every fix we saw today was in a rails
gem
A Rails reproduction script is a great place to start
None
I will almost always ask you for a reproduction sample
app
Just calling @sgrif is a great way to get rails
bugs fixed
None
Working on open source is really hard
None
This work represented 40+ hours of donated maintainer time
Hug a maintainer
Find some time to work on open source
Pay a maintainer?
None
None
Thanks @samphippen
[email protected]
Let’s have some questions