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
380
Other Decks in Programming
See All in Programming
とにかくAWS GameDay!AWSは世界の共通言語! / Anyway, AWS GameDay! AWS is the world's lingua franca!
seike460
PRO
1
870
PHP でアセンブリ言語のように書く技術
memory1994
PRO
1
170
ピラミッド、アイスクリームコーン、SMURF: 自動テストの最適バランスを求めて / Pyramid Ice-Cream-Cone and SMURF
twada
PRO
10
1.3k
TypeScript Graph でコードレビューの心理的障壁を乗り越える
ysk8hori
2
1.1k
AWS IaCの注目アップデート 2024年10月版
konokenj
3
3.3k
よくできたテンプレート言語として TypeScript + JSX を利用する試み / Using TypeScript + JSX outside of Web Frontend #TSKaigiKansai
izumin5210
6
1.7k
Why Jakarta EE Matters to Spring - and Vice Versa
ivargrimstad
0
1.1k
Outline View in SwiftUI
1024jp
1
330
CSC509 Lecture 13
javiergs
PRO
0
110
ペアーズにおけるAmazon Bedrockを⽤いた障害対応⽀援 ⽣成AIツールの導⼊事例 @ 20241115配信AWSウェビナー登壇
fukubaka0825
6
1.9k
카카오페이는 어떻게 수천만 결제를 처리할까? 우아한 결제 분산락 노하우
kakao
PRO
0
110
弊社の「意識チョット低いアーキテクチャ」10選
texmeijin
5
24k
Featured
See All Featured
Adopting Sorbet at Scale
ufuk
73
9.1k
A Tale of Four Properties
chriscoyier
156
23k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.4k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
Unsuck your backbone
ammeep
668
57k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
31
2.7k
Code Reviewing Like a Champion
maltzj
520
39k
GraphQLとの向き合い方2022年版
quramy
43
13k
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
YesSQL, Process and Tooling at Scale
rocio
169
14k
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