Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up
for free
Intro-spec-tion RubyConfAU 2016
Jon Rowe
February 11, 2016
Technology
0
120
Intro-spec-tion RubyConfAU 2016
A whirlwind tour of the internals of RSpec.
Jon Rowe
February 11, 2016
Tweet
Share
More Decks by Jon Rowe
See All by Jon Rowe
jonrowe
0
140
jonrowe
0
72
jonrowe
1
190
jonrowe
3
320
jonrowe
1
57
jonrowe
0
62
jonrowe
0
40
jonrowe
0
110
jonrowe
0
91
Other Decks in Technology
See All in Technology
go5paopao
0
230
grapecity_dev
0
170
optim
0
190
yshr1200
0
170
pohjus
0
3.3k
miyakemito
1
540
1027kg
0
170
feststelltaste
0
110
sadayoshitada0919
0
100
hashhub
3
15k
lancers_pr
4
1.4k
yosuke_matsuura
PRO
0
170
Featured
See All Featured
revolveconf
200
9.7k
cromwellryan
103
6.1k
jasonvnalue
82
8.1k
cassininazir
347
20k
addyosmani
311
21k
pauljervisheath
196
15k
aarron
257
36k
morganepeng
93
14k
morganepeng
18
1.2k
wjessup
339
16k
sstephenson
145
12k
skipperchong
8
710
Transcript
Intro-spec-tion @JonRowe
WHAT IS RSPEC?
<test-unit>
<rspec>
BUT WHAT *IS* RSPEC?
None
CORE MOCKS EXPECTATIONS
CORE MOCKS EXPECTATIONS
CORE MOCKS EXPECTATIONS
CORE MOCKS EXPECTATIONS
CORE MOCKS EXPECTATIONS
CORE
CORE SHOULDA
None
EXPECTATIONS TestUnit
None
EXPECTATIONS TestUnit MOCKS
ETC ETC ETC…
None
BUT WHAT *IS* RSPEC?
ANATOMY OF A SPEC
<rspec>
<core only>
<core only> Example Group
<core only> Instance Methods
<core only> Hooks
<core only> Example
None
None
RSPEC CORE
THE WORLD
CONFIGURATION
THE REPORTER
THE RUNNER
WAIT… EXAMPLE GROUPS…
Runner ExampleGroup Example #<ExampleGroup> before(:suite) before(:group) before(:each)
<rabbit hole>
Runner ExampleGroup Example #<ExampleGroup> after(:suite) after(:group) after(:each)
<blue pill>
<heirarchy>
BUT WHY
JUST RUBY
<include>
<include>
<include>
RSPEC EXPECTATIONS
<core only>
<rspec>
<target>
<matcher>
<protocol>
<DSL>
<class>
<class>
RSPEC MOCKS
<mocks>
<mocks>
<mocks>
SO HOW DOES IT WORK?
<protocol>
RSPEC RAILS
None
None
None
after(:talk)
Thanks @JonRowe