-
Notifications
You must be signed in to change notification settings - Fork 0
/
testing_guidelines.html
285 lines (220 loc) · 10.3 KB
/
testing_guidelines.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title></title>
<!-- plugin styles -->
<link rel="stylesheet" type="text/css" href="stylesheets/highlight-github.css" />
<!-- guides styles -->
<link rel="stylesheet" type="text/css" href="stylesheets/reset.css" />
<link rel="stylesheet" type="text/css" href="stylesheets/main.css" />
<link rel="stylesheet" type="text/css" href="stylesheets/print.css" media="print" />
<link rel="stylesheet" type="text/css" href="stylesheets/guides.css" />
<link rel="stylesheet" type="text/css" href="stylesheets/overrides.style.css" />
<link rel="stylesheet" type="text/css" href="stylesheets/overrides.print.css" media="print" />
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link href="//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css" rel="stylesheet">
<meta name="generator" content="DocPad v6.79.0" />
</head>
<body class="guide">
<header role="banner">
<div class="container">
<h1 id="logo">
<a href="http://www.sproutcore.com"><img src="images/header/logo.png" alt="SproutCore" /></a>
</h1>
<nav role="navigation">
<ul>
<li><a href="http://sproutcore.com/about/">About</a></li>
<li><a href="http://showcase.sproutcore.com">Showcase</a></li>
<li class="active"><a href="http://guides.sproutcore.com">Guides</a></li>
<li><a href="http://docs.sproutcore.com">Docs</a></li>
<li><a href="http://sproutcore.com/community/">Community</a></li>
<li><a href="http://blog.sproutcore.com">Blog</a></li>
</ul>
</nav>
</div>
</header>
<div id="feature">
<div class="wrapper">
<div class="feature_header">
<a href="/"><img src="images/graphics/guides.png"></a>
<h2><a href="/">SproutCore Guides</a></h2>
<p>These guides are designed to help you write and perfect your code.</p>
</div>
<div class="feature_sidebar">
<a href="index.html" id="guidesMenu">
Guides Index <span id="guidesArrow">▸</span>
</a>
<div id="guides" class="clearfix" style="display: none;">
<a href="index.html" class="guidesMenu">
Guides Index <span class="guidesArrow">▾</span>
</a>
<hr style="clear:both;">
<dl class='L'><dt>Start Here</dt>
<dd><a href='/getting_started.html'>Getting Started: Part 1</a></dd>
<dd><a href='/getting_started_2.html'>Getting Started: Part 2</a></dd>
<dd><a href='/getting_started_3.html'>Getting Started: Part 3</a></dd>
<dd><a href='/core_concepts_sc_object.html'>Classes and SC.Object</a></dd>
<dd><a href='/core_concepts_kvo.html'>Computed Properties, Observers and Bindings</a></dd><dt>Views</dt>
<dd><a href='/views.html'>Core View Concepts</a></dd><dt>Models</dt>
<dd><a href='/records.html'>SproutCore Records</a></dd>
<dd><a href='/fixtures.html'>Using Fixtures</a></dd><dt>Theming</dt>
<dd><a href='/chance.html'>Using Chance, SproutCore's CSS Framework</a></dd>
<dd><a href='/theming_app.html'>Theming Your App</a></dd></dl><dl class='R'><dt>Testing</dt>
<dd><a href='/adding_unit_test.html'>Adding a Unit Test</a></dd>
<dd><a href='/unit_test_framework.html'>Unit Testing</a></dd>
<dd><a href='/writing_unit_tests.html'>Writing Unit Tests</a></dd>
<dd><a href='/running_unit_tests.html'>Running Unit Tests</a></dd>
<dd><a href='/todos_tdd.html'>SproutCore Development Using TDD</a></dd><dt>Extras</dt>
<dd><a href='/build_tools.html'>SproutCore's Build Tools</a></dd>
<dd><a href='/run_loop.html'>The Run Loop</a></dd>
<dd><a href='/enumerables.html'>Enumerables</a></dd><dt>Contributing to SproutCore</dt>
<dd><a href='/style_guide.html'>Javascript Guidelines</a></dd>
<dd><a href='/commit_code.html'>Committer Guidelines</a></dd>
<dd><a href='/documentation_guidelines.html'>Documentation Guidelines</a></dd>
<dd><a href='/contribute.html'>Contributing Guides</a></dd><dt>Thanks</dt>
<dd><a href='/credits.html'>Credits</a></dd></dl>
</div>
</div>
</div>
</div>
<div id="container">
<div class="wrapper">
<div id="mainCol">
<div class='headerSection'>
<h2>Testing Guidelines</h2>
<p>This guide covers using test-driven development (TDD) techniques to develop SproutCore applications. After reading this guide, you will be able to:</p>
<ul>
<li>Write tests for methods to be implemented and use them to help you implement them.</li>
<li>Write tests to verify that your observers fire when you expect them to.</li>
<li>Write tests that verify your bindings fire when you expect them to and how to incorporate +SC.RunLoop+ so that they will function.</li>
<li><em>TODO</em> - more</li>
</ul>
</div>
<div class='warning'><p> This guide is under construction.
</p></div>
<h3 id='-Test-drive-SproutCore-Method-Implementation-'>1 - Test-drive SproutCore Method Implementation
</h3>
<h3 id='-Test-drive-Observer-Implementation-'>2 - Test-drive Observer Implementation
</h3>
<h3 id='-Test-drive-Bindings-Implementation-'>3 - Test-drive Bindings Implementation
</h3>
<h3 id='-Next-'>4 - Next
</h3>
<p>Let's reinvent the <em>todos</em> project using TDD techniques.</p>
<p>On to <a href="/todos_tdd.html">SproutCore Development Using TDD »</a></p>
<h3 id='-Changelog-'>5 - Changelog
</h3>
<ul>
<li>February 15, 2011: initial placeholder by <a href="credits.html#oldfartdeveloper">Scott Smith</a> and <a href="credits.html#veebs">Vibul Imtarnasan</a></li>
<li>August 14, 2013: converted to Markdown format for DocPad guides by <a href="credits.html#topherfangio">Topher Fangio</a></li>
</ul>
</div>
<!-- TODO: re-add index_items //-->
<div id="subCol">
<h3 class="chapter"><img src="images/graphics/chapters.png" alt="">Chapters</h3>
<ol class='chapters'>
<li>
<a href='#-Test-drive-SproutCore-Method-Implementation-'><p> Test-drive SproutCore Method Implementation
</p></a>
<ul>
</ul>
</li>
<li>
<a href='#-Test-drive-Observer-Implementation-'><p> Test-drive Observer Implementation
</p></a>
<ul>
</ul>
</li>
<li>
<a href='#-Test-drive-Bindings-Implementation-'><p> Test-drive Bindings Implementation
</p></a>
<ul>
</ul>
</li>
<li>
<a href='#-Next-'><p> Next
</p></a>
<ul>
</ul>
</li>
<li>
<a href='#-Changelog-'><p> Changelog
</p></a>
<ul>
</ul>
</li>
</ol>
</div>
</div>
</div>
<hr class="hide" />
<footer>
<div class="container">
<div class="col">
<a href="index.html"><img src="images/footer/sc_logo_medium.png" alt="SproutCore" /></a>
<p id="license">
SproutCore framework is under MIT License.
</p>
</div>
<nav class="col">
<h1>Site Navigation</h1>
<ul>
<li><a href="http://www.sproutcore.com/about/">About</a></li>
<li><a href="http://docs.sproutcore.com">Docs</a></li>
<li><a href="http://blog.sproutcore.com">Blog</a></li>
<li><a href="http://www.sproutcore.com/install/?redirect=1">Download</a></li>
<li><a href="http://www.sproutcore.com/community/">Community</a></li>
<li><a href="https://github.com/sproutcore/sproutcore">GitHub</a></li>
<li><a href="mailto:community@sproutcore.com">Contact Us</a></li>
<li><a href="http://guides.sproutcore.com">Guides</a></li>
</ul>
<a href="http://www.w3.org/html/logo/"><img src="images/footer/html5_tech.png" alt="HTML5 Powered" /></a>
</nav>
<div class="col">
<h1>Get in Touch, Stay Informed</h1>
<ul class="social">
<li><a href="http://twitter.com/sproutcore"><img src="images/footer/twitter.png" alt="Twitter" /></a></li>
<li><a href="http://www.facebook.com/sproutcore"><img src="images/footer/facebook.png" alt="Facebook" /></a></li>
<li><a href="http://groups.google.com/group/sproutcore"><img src="images/footer/google.png" alt="Google Groups" /></a></li>
<li><a href="http://groups.google.com/group/sproutcore">Subscribe To Mailing List</a></li>
</ul>
<a href="http://eepurl.com/dK1-Y" target="_blank" id="newsletter" class="button secondary">Sign Up For Our Newsletter!</a>
<!-- Commented out until we have mailchimp API integration.
<h2>Subscribe To Newsletter</h2>
<div id="subscribe">
<form>
<input type="text" name="email" />
<button name="subscribe">Sign-Up</button>
<div class="processing"><img src="/img/spinner.gif"></div>
<div class="error"></div>
</form>
</div>
-->
</div>
<a href="#feature" class="top">Back To Top</a>
</div>
</footer>
<script type='text/javascript' src='/javascripts/jquery.min.js'></script>
<script type='text/javascript'>
/*
* Make the guides link clickable
*/
function guideMenu(e){
if (document.getElementById('guides').style.display == "none") {
document.getElementById('guides').style.display = "block";
document.getElementById('guidesArrow').innerHTML = "▾";
$('body').click(function(e){ guideMenu(e); });
} else {
document.getElementById('guides').style.display = "none";
document.getElementById('guidesArrow').innerHTML = "▸";
$('body').unbind('click');
}
return false;
}
$('#guidesMenu, .guidesMenu').click(guideMenu);
</script>
</body>
</html>