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
BDD wat?
Search
Simon Højberg
November 15, 2012
Programming
500
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
BDD wat?
introducing BDD for the YUI crowd
Simon Højberg
November 15, 2012
More Decks by Simon Højberg
See All by Simon Højberg
dat YUI hack!
hojberg
1
410
Other Decks in Programming
See All in Programming
Foundry Localでエージェント開発
seosoft
0
110
信頼性の目標を誰も求めてない
shubox
0
480
Deep dive into the select statement (GopherCon UK)
jespino
0
170
typoなんかねぇよ
raspython3
0
660
DroidKaigi 2026 「個人開発という実験場: Android エンジニアが手にする4つの自由」
slashnephy
0
200
What We Talk About When We Talk About XP
m_seki
2
280
自分的「カンファレンスの楽しみ方」
syumai
0
180
PyConJP2026_wat_Python × Signal Processing: How to Draw Pictures with Sound Using Spectrogram Art
wat
0
650
Building an Out-of-Order CPU
latte72
0
590
GKE アップグレード前に知っておきたい Blue/Green と PDB の関係
stkk
0
140
レビュー履歴をAIに食わせて、 Compose移行を加速するs
shihochan
0
260
ALB ログから Trace を気合で繋げる技術
fohte
7
860
Featured
See All Featured
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
490
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.5k
Bash Introduction
62gerente
615
220k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.6k
GitHub's CSS Performance
jonrohan
1033
470k
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.1k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
570
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
69
65k
Discover your Explorer Soul
emna__ayadi
2
1.3k
Being A Developer After 40
akosma
91
590k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
250
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
920
Transcript
BDD wat? Wednesday, November 14, 12
Behavior Driven Development Wednesday, November 14, 12
Ruby Rails Node.js Backbone Widely adopted by other communities Wednesday,
November 14, 12
WE SHOULD GET A PIECE OF THE PIE TOO Wednesday,
November 14, 12
ALWAYS START BY Describing behavior Get a red test THEN
Build the behavior Get a green test Wednesday, November 14, 12
Acceptance testing Unit testing Wednesday, November 14, 12
Acceptance testing Unit testing Wednesday, November 14, 12
Introducing Inspired by Jasmine and rspec <3 Wednesday, November 14,
12
Introducing Primrose Inspired by Jasmine and rspec <3 Wednesday, November
14, 12
Primrose YUI().use(‘gallery-primrose’); Coming soon! Wednesday, November 14, 12
describe(‘MilliniumFalcon.HyperDrive’, function () { beforeEach(function () { /* .. */
}); it(‘works when punched’, function (expect) { /* .. */ }); it(‘can reach FTL speed’, function (expect) { /* .. */ }); }); Wednesday, November 14, 12
describe(‘MilliniumFalcon.HyperDrive’, function () { beforeEach(function () { /* .. */
}); it(‘works when punched’, function (expect) { /* .. */ }); it(‘can reach FTL speed’, function (expect) { /* .. */ }); }); Wednesday, November 14, 12
describe(‘MilliniumFalcon.HyperDrive’, function () { var subject; beforeEach(function () { subject
= new Y.MilliniumFalcon.HyperDrive(); }); it(‘works when punched’, function (expect) { /* .. */ }); it(‘can reach FTL speed’, function (expect) { /* .. */ }); }); Wednesday, November 14, 12
describe(‘MilliniumFalcon.HyperDrive’, function () { var subject; beforeEach(function () { subject
= new Y.MilliniumFalcon.HyperDrive(); }); it(‘works when punched’, function (expect) { /* .. */ }); it(‘can reach FTL speed’, function (expect) { /* .. */ }); }); Wednesday, November 14, 12
describe(‘MilliniumFalcon.HyperDrive’, function () { var subject; beforeEach(function () { subject
= new Y.MilliniumFalcon.HyperDrive(); }); it(‘works when punched’, function (expect) { subject.punch(); expect( subject.get(‘isOperational’) ).toBe( true ); }); it(‘can reach FTL speed’, function (expect) { /* .. */ }); }); Wednesday, November 14, 12
describe(‘MilliniumFalcon.HyperDrive’, function () { var subject; beforeEach(function () { subject
= new Y.MilliniumFalcon.HyperDrive(); }); it(‘works when punched’, function (expect) { subject.punch(); expect( subject.get(‘isOperational’) ).toBe( true ); }); it(‘can reach FTL speed’, function (expect) { /* .. */ }); }); Wednesday, November 14, 12
describe(‘MilliniumFalcon.HyperDrive’, function () { var subject; beforeEach(function () { subject
= new Y.MilliniumFalcon.HyperDrive(); }); it(‘works when punched’, function (expect) { subject.punch(); expect( subject.get(‘isOperational’) ).toBe( true ); }); it(‘can reach FTL speed’, function (expect) { subject.jump(); expect( subject.get(‘speed’) ).toBe( ‘FTL’ ); }); }); Wednesday, November 14, 12
describe(‘MilliniumFalcon.HyperDrive’, function () { var subject; beforeEach(function () { subject
= new Y.MilliniumFalcon.HyperDrive(); }); it(‘works when punched’, function (expect) { subject.punch(); expect( subject.get(‘isOperational’) ).toBe( true ); }); it(‘can reach FTL speed’, function (expect) { subject.jump(); expect( subject.get(‘speed’) ).toBe( ‘FTL’ ); }); }); Wednesday, November 14, 12
Red Green dat h4ck ↩ Wednesday, November 14, 12
ALWAYS START BY Describing behavior Get a red test THEN
Build the behavior Get a green test Wednesday, November 14, 12
thanks(); Wednesday, November 14, 12
/** @author Simon Højberg @company swipely.com @twitter @shojberg @github github.com/hojberg/primrose
**/ var thanks = function () { Y.log(“YOU’RE AWESOME!”); }; Wednesday, November 14, 12