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
1
480
BDD wat?
introducing BDD for the YUI crowd
Simon Højberg
November 15, 2012
Tweet
Share
More Decks by Simon Højberg
See All by Simon Højberg
dat YUI hack!
hojberg
1
400
Other Decks in Programming
See All in Programming
CSC307 Lecture 02
javiergs
PRO
1
770
CSC307 Lecture 05
javiergs
PRO
0
500
Patterns of Patterns
denyspoltorak
0
1.4k
フロントエンド開発の勘所 -複数事業を経験して見えた判断軸の違い-
heimusu
7
2.8k
なるべく楽してバックエンドに型をつけたい!(楽とは言ってない)
hibiki_cube
0
140
副作用をどこに置くか問題:オブジェクト指向で整理する設計判断ツリー
koxya
1
590
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
500
Automatic Grammar Agreementと Markdown Extended Attributes について
kishikawakatsumi
0
180
2026年 エンジニアリング自己学習法
yumechi
0
130
今から始めるClaude Code超入門
448jp
7
8.5k
Data-Centric Kaggle
isax1015
2
760
AI Agent Tool のためのバックエンドアーキテクチャを考える #encraft
izumin5210
6
1.8k
Featured
See All Featured
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
220
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
2.1k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Embracing the Ebb and Flow
colly
88
5k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
200
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
62
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
280
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.2k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.2k
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