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
自分ひとりから始められる生産性向上の取り組み #でぃーぷらすオオサカ
irof
8
2.7k
一休.com のログイン体験を支える技術 〜Web Components x Vue.js 活用事例と最適化について〜
atsumim
0
320
社内フレームワークとその依存性解決 / in-house framework and its dependency management
vvakame
1
550
ARA Ansible for the teams
kksat
0
150
[JAWS-UG横浜 #79] re:Invent 2024 の DB アップデートは Multi-Region!
maroon1st
1
140
Djangoアプリケーション 運用のリアル 〜問題発生から可視化、最適化への道〜 #pyconshizu
kashewnuts
1
240
GoとPHPのインターフェイスの違い
shimabox
2
170
チームリードになって変わったこと
isaka1022
0
190
『GO』アプリ バックエンドサーバのコスト削減
mot_techtalk
0
140
[Fin-JAWS 第38回 ~re:Invent 2024 金融re:Cap~]FaultInjectionServiceアップデート@pre:Invent2024
shintaro_fukatsu
0
410
負債になりにくいCSSをデザイナとつくるには?
fsubal
9
2.4k
ISUCON14公式反省会LT: 社内ISUCONの話
astj
PRO
0
190
Featured
See All Featured
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.2k
Side Projects
sachag
452
42k
A designer walks into a library…
pauljervisheath
205
24k
YesSQL, Process and Tooling at Scale
rocio
171
14k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
7
630
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
27
1.9k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
366
25k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
27
1.5k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
129
19k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
10
1.3k
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