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
Let's Write a Train Tracking Algorithm
twocentstudios
0
220
Introducing ReActionView: A new ActionView-Compatible ERB Engine @ Kaigi on Rails 2025, Tokyo, Japan
marcoroth
3
900
XP, Testing and ninja testing ZOZ5
m_seki
2
260
CSC509 Lecture 03
javiergs
PRO
0
320
大規模アプリのDIフレームワーク刷新戦略 ~過去最大規模の並行開発を止めずにアプリ全体に導入するまで~
mot_techtalk
0
370
Pull-Requestの内容を1クリックで動作確認可能にするワークフロー
natmark
1
440
Conquering Massive Traffic Spikes in Ruby Applications with Pitchfork
riseshia
0
150
大規模アプリにおけるXcode Previews実用化までの道のり
ikesyo
0
1k
Goで実践するドメイン駆動開発 AIと歩み始めた新規プロダクト開発の現在地
imkaoru
2
140
Playwrightはどのようにクロスブラウザをサポートしているのか
yotahada3
7
2.2k
monorepo の Go テストをはやくした〜い!~最小の依存解決への道のり~ / faster-testing-of-monorepos
convto
2
260
iOSDC.pdf
chronos2500
2
650
Featured
See All Featured
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
188
55k
Raft: Consensus for Rubyists
vanstee
139
7.1k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
A better future with KSS
kneath
239
17k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.2k
Music & Morning Musume
bryan
46
6.8k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
30
2.9k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4k
The Cult of Friendly URLs
andyhume
79
6.6k
Designing for humans not robots
tammielis
254
25k
The Pragmatic Product Professional
lauravandoore
36
6.9k
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