mattpuchlerz-jspec 2.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. data/History.rdoc +513 -0
  2. data/Manifest +57 -0
  3. data/README.rdoc +825 -0
  4. data/Rakefile +75 -0
  5. data/bin/jspec +305 -0
  6. data/jspec.gemspec +44 -0
  7. data/lib/images/bg.png +0 -0
  8. data/lib/images/hr.png +0 -0
  9. data/lib/images/loading.gif +0 -0
  10. data/lib/images/sprites.bg.png +0 -0
  11. data/lib/images/sprites.png +0 -0
  12. data/lib/images/vr.png +0 -0
  13. data/lib/jspec.css +145 -0
  14. data/lib/jspec.jquery.js +71 -0
  15. data/lib/jspec.js +1771 -0
  16. data/lib/jspec.shell.js +36 -0
  17. data/lib/jspec.timers.js +84 -0
  18. data/lib/jspec.xhr.js +183 -0
  19. data/server/browsers.rb +228 -0
  20. data/server/helpers.rb +82 -0
  21. data/server/routes.rb +57 -0
  22. data/server/server.rb +88 -0
  23. data/spec/async +1 -0
  24. data/spec/env.js +695 -0
  25. data/spec/fixtures/test.html +1 -0
  26. data/spec/fixtures/test.json +1 -0
  27. data/spec/fixtures/test.xml +5 -0
  28. data/spec/helpers.js +66 -0
  29. data/spec/server.rb +2 -0
  30. data/spec/spec.dom.html +34 -0
  31. data/spec/spec.fixtures.js +18 -0
  32. data/spec/spec.grammar-less.js +34 -0
  33. data/spec/spec.grammar.js +226 -0
  34. data/spec/spec.jquery.js +176 -0
  35. data/spec/spec.jquery.xhr.js +35 -0
  36. data/spec/spec.js +166 -0
  37. data/spec/spec.matchers.js +493 -0
  38. data/spec/spec.modules.js +67 -0
  39. data/spec/spec.node.js +46 -0
  40. data/spec/spec.rhino.js +17 -0
  41. data/spec/spec.server.html +29 -0
  42. data/spec/spec.shared-behaviors.js +80 -0
  43. data/spec/spec.utils.js +279 -0
  44. data/spec/spec.xhr.js +156 -0
  45. data/templates/default/History.md +4 -0
  46. data/templates/default/README.md +30 -0
  47. data/templates/default/lib/yourlib.js +2 -0
  48. data/templates/default/spec/server.rb +4 -0
  49. data/templates/default/spec/spec.dom.html +20 -0
  50. data/templates/default/spec/spec.rhino.js +9 -0
  51. data/templates/default/spec/spec.server.html +16 -0
  52. data/templates/default/spec/yourlib_spec.js +11 -0
  53. data/templates/rails/server.rb +4 -0
  54. data/templates/rails/spec.application.js +8 -0
  55. data/templates/rails/spec.dom.html +20 -0
  56. data/templates/rails/spec.rhino.js +8 -0
  57. data/templates/rails/spec.server.html +16 -0
  58. metadata +166 -0
@@ -0,0 +1,513 @@
1
+
2
+ === 2.11.0 / 2009-09-04
3
+
4
+ * Added --symlink switch (links the current version of JSpec to ./spec/lib) [#4]
5
+ * Added --freeze switch (copies the current version of JSpec to ./spec/lib) [#4]
6
+
7
+ === 2.10.1 / 2009-09-02
8
+
9
+ * Added `jspec shell` sub command (interactive Rhino shell through JSpec)
10
+ * Added jspec.shell.js
11
+
12
+ === 2.10.0 / 2009-08-27
13
+
14
+ * Added Async support via mock timers (lib/jspec.timers.js) [#19]
15
+ * IRC channel up and running! irc://irc.freenode.net#jspec
16
+
17
+ === 2.9.1 / 2009-08-21
18
+
19
+ * Added module support for formatters
20
+
21
+ === 2.9.0 / 2009-08-21
22
+
23
+ * Server output matching Rhino when using verbose or failuresOnly options
24
+ * Added mock_request() and unmock_request() as aliases for mockRequest() and unmockRequest()
25
+ * Added JSpec.JSON.encode()
26
+ * Added default Sinatra routes /slow/NUMBER and /status/NUMBER for simulating
27
+ slow reponses and HTTP status codes.
28
+ * Added server support for loading spec/jspec.rb (or jspec/jspec.rb for rails)
29
+ Allowing additional browser support to be plugged in, as well as Sinatra routes.
30
+ * Added dependency for Sinatra (new server)
31
+ * Added a new Ruby server
32
+ * Added support for --bind and --server on various platforms
33
+ * Added Google Chrome support
34
+ * Added Internet Explorer support
35
+ * Change; --server without --browsers defaults to all supported browsers
36
+ * Removed JSpec.reportToServer()
37
+ Now utilizes JSpec.formatters.Server to handle this
38
+ functionality.
39
+ * Fixed Server output escaping (removed html escaping from puts()) [#13]
40
+ * Fixed JSpec.load(); returns responseText when 2xx or 0 (for file://)
41
+
42
+ === 2.8.4 / 2009-08-02
43
+
44
+ * Fixed error thrown when a module has no utilities
45
+
46
+ === 2.8.3 / 2009-07-30
47
+
48
+ * Added JSpec.evalHook()
49
+ * Added JSpec.paramsFor()
50
+ * Refactored jspec.xhr.js
51
+ * Fixed mock xhr HEAD method
52
+ * Fixed node.js print() newline issue
53
+ * Fixed specs preventing spec/spec.node.js from running
54
+
55
+ === 2.8.2 / 2009-07-29
56
+
57
+ * Added JSpec.tryLoading()
58
+ * Added JSpec.request used to reference the original XMLHttpRequest; used to fix [#149]
59
+ * Fixed Mock XHR issue messing up JSpec request related utilities such as fixture() [#149]
60
+
61
+ === 2.8.1 / 2009-07-27
62
+
63
+ * Added Lawrence Pit as a contributor
64
+ * Fixed object hash equality [#146]
65
+ { a : '1', b : '2' } is now the same as:
66
+ { b : '2', a : '1' }
67
+
68
+ === 2.8.0 / 2009-07-27
69
+
70
+ * Give readFile precendence over xhr so that fixtures work with mockRequest when using Rhino
71
+ * Give XMLHttpRequest precedence over microsoft crap
72
+ * Added Mock Ajax Support
73
+ * Added mockRequest(), unmockRequest() utilities
74
+ * Added jspec.xhr.js
75
+ * Fixed be_visible, and be_hidden. Now implement the jQuery <= 1.3.1 method
76
+
77
+ === 2.7.2 / 2009-07-24
78
+
79
+ * Fixed "end" in spec bodies when using the grammar
80
+ * Fixed "it" in spec bodies when using the grammar [#142]
81
+ * Changed; HTML entities in descriptions are now escaped for DOM formatter [#141]
82
+ * Added enno84@gmx.net as a contributor (thanks for the bug reports)
83
+
84
+ === 2.7.1 / 2009-07-17
85
+
86
+ * Changed; hash() now accepts null
87
+ * Fixed should_receive issue with validating boolean args or return values
88
+ * Fixed --server-only switch
89
+ * Fixed jQuery dependency error message when jQuery is not available
90
+ when using jspec.jquery.js
91
+
92
+ === 2.7.0 / 2009-07-14
93
+
94
+ * Added fixture() utility function
95
+ * Templates initialize with example paths to lib
96
+
97
+ === 2.6.0 / 2009-07-09
98
+
99
+ * Added Ruby on Rails support
100
+ * Added exporting of JSpec (node.js etc)
101
+ * Added be_undefined matcher [#134]
102
+
103
+ === 2.5.1 / 2009-07-07
104
+
105
+ * Added intermediate node.js support
106
+ * Fixed; grammar now allows foo.bar.baz.stub() etc to convert to stub(foo.bar.baz)
107
+
108
+ === 2.5.0 / 2009-07-03
109
+
110
+ * Added contrib in README (thanks to anyone who has helped)
111
+ * Added more shared behavior specs
112
+ * Added Module.DSLs support for extending / adding new DSLs (DSL exchange not yet fully implemented)
113
+ * Added spec to make sure methods like end() will not fail due to the grammar
114
+ * Changed; giving hook precedence to suite hooks (before_each, etc) over module hooks (beforeSuite, etc) ; (thanks mpd)
115
+ * Changed; calls to stub() without and_return() now simply stub an arbitrary method with no return value
116
+ * Changed JSpec.include(); now returns JSpec allowing chaining
117
+ * Fixed having "end" in descriptions which would be replaced with '});'
118
+ * Fixed negation of should.receive('foo') matcher
119
+ * Fixed shared behavior assertion count issue
120
+
121
+ === 2.4.3 / 2009-07-02
122
+
123
+ * Fixed matcher semicolon matcher issue when using the JSpec grammar
124
+ * Added pass() util; Spec#pass() and Spec#fail() (thanks gisikw)
125
+ * Removing Object.prototype.stubby() after specs are finished to prevent pollution
126
+
127
+ === 2.4.2 / 2009-06-30
128
+
129
+ * Fixed trailing comma (thanks Kevin)
130
+
131
+ === 2.4.1 / 2009-06-30
132
+
133
+ * Moved beforeSpec and afterSpec hook into proper positions
134
+ allowing for additional assertions within afterSpec.
135
+
136
+ === 2.4.0 / 2009-06-30
137
+
138
+ * Added hook() and hookImmutable()
139
+ * Added support for matcher lists ('be enabled disabled selected') == be_enabled, be_disabled etc
140
+ * Added JSpec.include()
141
+ * Added several hooks
142
+ * Added Module support
143
+ * Added grammar conversion of Foo.stub('method') to stub(Foo, 'method')
144
+ * Added grammar conversion of Foo.destub() to destub(Foo)
145
+ * Require bind gem
146
+ * Fixed `jspec` bin docs
147
+
148
+ === 2.3.1 / 2009-06-25
149
+
150
+ * Fixed; all stubs generated with stub() are restored
151
+ to their original methods after each 'it' block. See
152
+ README for details.
153
+
154
+ === 2.3.0 / 2009-06-25
155
+
156
+ * Added stub()
157
+ * Added destub()
158
+ * Changed; Server responses utilize Rack::Mime now for arbitrary requests
159
+
160
+ === 2.2.1 / 2009-06-22
161
+
162
+ * Changed; reportToServer() now accepts url arg
163
+
164
+ * Fixed be_empty matcher; now considers {} empty, however { foo : bar } is not
165
+ * Fixed throw_error error messages for Opera
166
+ * Fixed throw_error in Rhino (Opera is broken now)
167
+ * Fixed stray console.log() call
168
+
169
+ * Fixed some tab issues.
170
+ When using the JSpec grammar option you should
171
+ use the 'soft tabs' feature of your IDE or text editor.
172
+ A patch for tabs is pending and should be available soon,
173
+ however be aware that a 'parse error' may occur otherwise.
174
+
175
+ === 2.2.0 / 2009-06-18
176
+
177
+ * Added link to JSpec in JSMag June 2009
178
+ * Added Github gem source location to docs
179
+ * Changed throw_error matcher; now accepts two arguments
180
+ * Changed --server; serves from current working directory.
181
+ This allows files in ../lib/* to be served rather than ./spec/* only.
182
+ * Refactored argumentsToArray()
183
+
184
+ === 2.1.0 / 2009-06-12
185
+
186
+ * Changed `jspec init` to utilize a single template
187
+ which allows for all three suite running capabilities
188
+ within a single template. Now after initializing a
189
+ project you may `jspec run --server`, `jspec run --rhino`
190
+ etc at any time without modifications.
191
+
192
+ === 2.0.3 / 2009-05-15
193
+
194
+ * Table should span full width
195
+ (Very week release I know, but improperly styled things bug me :) )
196
+
197
+ === 2.0.2 / 2009-05-11
198
+
199
+ * Added rails integration link http://github.com/bhauman/jspec-rails
200
+ * Changed; puts() now displays constructor name when available
201
+ * Fixed Terminal output which was not displaying due to a recent commit
202
+ * fixed IE bug : DOM elements don't have valueOf() method
203
+
204
+ === 2.0.1 / 2009-05-01
205
+
206
+ * Added better failure messages for throw_error matcher
207
+ * Renamed print() to puts() [#108]
208
+
209
+ === 2.0.0 / 2009-04-27
210
+
211
+ * Added DOM loading indicator [#105]
212
+ * Added wait() helper for additional async support
213
+ * Added shared behavior support using should_behave_like('Another Suite')
214
+ * Added CSS body toggling [#1]
215
+ * Added receive matcher for Proxy Assertins
216
+ * Added grammar-less support
217
+ * Added an_instance_of() helper
218
+ * Removed .this literal
219
+ * Removed deprecated be_a_TYPE_input matchers
220
+
221
+ * Added ProxyAssertion
222
+ * Added select() util
223
+ * Added does() util for report-less assertions
224
+ * Added find() util
225
+ * Added JSpec.contentsOf()
226
+ * Added matchers to body evaluation [#90]
227
+
228
+ === 1.1.7 / 2009-04-22
229
+
230
+ * Removed trailing commas causing issues with IE (what a suprise ;) )
231
+
232
+ === 1.1.6 / 2009-04-22
233
+
234
+ * Fixed typo in requires()
235
+ * Added expect()
236
+
237
+ === 1.1.5 / 2009-04-17
238
+
239
+ * Strengthened specs for cascading hooks
240
+ * Fixed cascading hooks
241
+
242
+ === 1.1.4 / 2009-04-17
243
+
244
+ * Added rhino and server template files
245
+ * Added JSpec.hasXhr()
246
+ * Added JSpec.xhr()
247
+ * Added Ruby javascript testing server
248
+ * Added support for options passed to run()
249
+ * Added failuresOnly for Terminal formatter
250
+ * Added terminal assertion graphs
251
+ * Addec color() utility
252
+ * Added main.puts() since we use print() as a utility
253
+ * Added rhino support
254
+ * Added fail() utility function
255
+ * Added JSpec.Assertion
256
+ * Added normalizeMatcherMessage()
257
+ * Added normalizeMatcherBody()
258
+ * Added have_classes [#19]
259
+ * Added extend() utility
260
+ * Added be_an_instance_of matcher
261
+ * Added constructor checking support for throw_error matcher [#72]
262
+ * Added file support for exception messages, making them much easier to debug
263
+ * Added catching of exceptions throw within specs [#46]
264
+ * Changed; executable aborts when template does not exist
265
+ * Changed; matchers now normalized upon creation, accepts function, hash, or string.
266
+ * Changed be() matcher to be strict [#57]
267
+ * Changed error() to conditionally show line number when available
268
+ * Renamed Jspec.addSuite to JSpec.describe and Suite#addSpec to Suite#it
269
+ * Refactored be_a_TYPE_input matchers so that the deprication warning is logged only when calling the method
270
+ * Fixed JSpec.requires() now works with latest version of JSpec.error()
271
+ * Fixed error() now displays exceptions throw that do not respond to .message
272
+ * Fixed commenting bug [#37]
273
+ * Removed JSpec.main, now just using local main
274
+
275
+ === 1.1.3 / 2009-04-14
276
+
277
+ * Removed /test used for the executable, causing gem to fail building
278
+
279
+ === 1.1.2 / 2009-04-14
280
+
281
+ * Added `jspec update` sub-command [#63]
282
+
283
+ === 1.1.1 / 2009-04-12
284
+
285
+ * Added gemspec
286
+
287
+ === 1.1.0 / 2009-04-12
288
+
289
+ * jspec executable fully functional
290
+
291
+ === 1.0.4 / 2009-04-09
292
+
293
+ * Added `jspec bind`
294
+ * Added `jspec run`
295
+ * Added `jspec init`
296
+ * Added `jspec` executable
297
+ * Added gemspec and manifest
298
+ * Added command-line usage docs
299
+ * Added custom matchers documentation
300
+ * Removed double negation
301
+
302
+ === 1.0.3 / 2009-04-08
303
+
304
+ * Added have_prop matcher, have_property is now strict [#56]
305
+
306
+ === 1.0.2 / 2009-04-08
307
+
308
+ * Added be_selected, be_checked matchers
309
+ * Added string support to each() each('some foo bar', ...)
310
+ * Added have_ATTR matchers [#51]
311
+ * Deprected be_a_TYPE_input matchers [#50]
312
+
313
+ === 1.0.1 / 2009-04-07
314
+
315
+ * Added have_property matcher [#53]
316
+
317
+ === 1.0.0 / 2009-04-06
318
+
319
+ * Added option() which gives the query string option precedence [#39]
320
+ * Changed; Using JSpec.options.formatter not JSpec.formatter [#44]
321
+ * Fixed Console formatter, now displays nested suites
322
+ * Check out http://visionmedia.github.com/jspec for additional documentation!
323
+
324
+ === 0.9.6 / 2009-04-03
325
+
326
+ * Added nesting support
327
+ * Added printing of nested specs
328
+ * Added assertion graphs to DOM formatter
329
+ * Refactored preprocess()
330
+ * Refactored most of the specs
331
+ * Renamed preProcess() to preprocess()
332
+ * Removed running of a single suite via ?suite= for now
333
+
334
+ === 0.9.5 / 2009-04-02
335
+
336
+ * Added support for printing of function bodies and regexps [#27]
337
+ * Added support for strings / regexp with should_throw_error [#26]
338
+ * Added have_within matcher
339
+ * Added have_at_most matcher
340
+ * Added have_at_least matcher
341
+ * Added have matcher [#24]
342
+
343
+ === 0.9.4 / 2009-04-02
344
+
345
+ * Added be_a_TYPE_input matchers (be_a_checkbox_input, be_a_text_input, etc)
346
+ * Added be_disabled matcher [#21]
347
+ * Added be_enabled matcher [#20]
348
+ * Refactored be_visible and be_hidden with $(elem).is()
349
+
350
+ === 0.9.2 / 2009-04-02
351
+
352
+ * Added support for multi-arg failure messages [#2]
353
+ * Better printing of jQuery objects [#15]
354
+
355
+ === 0.9.1 / 2009-04-02
356
+
357
+ * Added support for dotted negation of assertions (foo.should.not.equal bar)
358
+ * Added support for dot-style assertions [#17] (foo.should_not.equal bar)
359
+
360
+ === 0.9.0 / 2009-04-01
361
+
362
+ * Added spec for strip()
363
+ * Added strip()
364
+ * Added any() util
365
+ * Added new improved include matcher
366
+ * Added have_many and have_one matchers
367
+ * Added have_attr matcher [#14]
368
+ * Added map() util
369
+ * Added inject() util
370
+ * Added escape() util
371
+ * Added recursive array and object printing
372
+ * Added DOM formatter option failuresOnly
373
+ * Added support for running of a single squite via ?suite=...
374
+ * Added query() util
375
+ * Added last() util
376
+ * Added be_within matcher, accepts a range literal
377
+ * Added inclusive range literal n..n
378
+ * Added row hover
379
+ * Refactored range()
380
+ * Refactored setMessage()
381
+ * Refactored hash()
382
+ * Changed; preprocessor passing array of args (multi-arg matcher support)
383
+ * Changed jQuery to $ for internal usage
384
+
385
+ === 0.8.0 / 2009-02-27
386
+
387
+ * Added a new style for the DOM formatter (not finished yet)
388
+
389
+ === 0.7.0 / 2009-02-27
390
+
391
+ * Added Console formatter (anything implementing the console object. Firebug, Safari 4, etc)
392
+ * Added JSpec.options.profile for optional profiling of specs
393
+ * Added this. literal alternative (view readme)
394
+ * Moved formatters into JSpec.formatters
395
+ * Added error() util
396
+ * Added savings raketask
397
+ * Fixed parse error bug in Safari 4
398
+
399
+ === 0.6.3 / 2009-02-26
400
+
401
+ * Added minification for jspec.jquery.js when packaging before release
402
+ * Added compression of css when packaging before release
403
+
404
+ === 0.6.2 / 2009-02-26
405
+
406
+ * Changed; using $ in jspec.jquery.js for JSpec, take that jQuery ;)
407
+ * Added addMatchers, print, hash, and each as 'utility functions' this allows
408
+ JSpec to do each(...) internally instead of JSpec.each(...), while still preventing
409
+ pollution of the global scope.
410
+
411
+ === 0.6.1 / 2009-02-26
412
+
413
+ * Added closrue literal -{ (view README)
414
+ * Added option to DOM formatter, now allows you to specify which element id to output to
415
+
416
+ === 0.6.0 / 2009-02-24
417
+
418
+ * Added JSpec.hash
419
+ * Added be_null matcher
420
+ * Allow recursive composite matching using should_eql and should_not_eql
421
+ For example [1, 2, [3]].should_eql([1, 2, [3]]) is true, works with object
422
+ 'hashes' as well.
423
+
424
+ === 0.5.1 / 2009-02-24
425
+
426
+ * Damn auto-release messed up
427
+
428
+ === 0.5.0 / 2009-02-24
429
+
430
+ * Added async support for jQuery
431
+ * Added JSpec.requires for dependencies
432
+ * Added JSpec.throw
433
+ * Added JSpec.runSpec
434
+ * Refactored jspec.jquery.js
435
+ * Fixed evalBody exceptions, previously was not showing exception message
436
+ * Fixed bug of JSpec interpreting // in a string such as http:// to be a comment.
437
+
438
+ === 0.4.1 / 2009-02-22
439
+
440
+ * Added elements() alias of element()
441
+ * Added support for string passed to runSuite; runSuite('Matchers') is the same as
442
+ runSuite(JSpec.suites['Matchers']).
443
+ * Fixed some documentation
444
+
445
+ === 0.4.0 / 2009-02-20
446
+
447
+ * Added comment literal (//)
448
+ * Added pre-processor for convering matchers.
449
+ For example 'test'.should_be_true becomes JSpec.match('test', 'should_be', 'true'),
450
+ preventing pollution of core prototypes.
451
+
452
+ === 0.3.2 / 2009-02-19
453
+
454
+ * Added TM bundle (go checkout my jspec.tmbundle repo on github)
455
+ * Renamed have_length_of to have_length
456
+
457
+ === 0.3.1 / 2009-02-19
458
+
459
+ * Added jquery js to package
460
+
461
+ === 0.3.0 / 2009-02-19
462
+
463
+ * Added JSpec.match
464
+ * Added options to report() which are passed to formatter
465
+ * Added sandbox helpers (reg / jquery)
466
+ * Added have_child and have_children
467
+ * Added have_tag and have_tags
468
+ * Changed exec to only load / eval file
469
+ * Fixed parser token issue, was previously matching things like end() as literal end
470
+
471
+ === 0.2.3 / 2009-02-18
472
+
473
+ * Changed test dir to spec
474
+ * Changed test.js to core.spec.js
475
+
476
+ === 0.2.2 / 2009-02-18
477
+
478
+ * Added contexts
479
+
480
+ === 0.2.0 / 2009-02-18
481
+
482
+ * Added release rake task
483
+ * Added package with minified alternative
484
+
485
+ === 0.1.0 / 2009-02-18
486
+
487
+ * Added new sexy syntax (warning: you will have to re-write your specs)
488
+ * Added pre-processor for optional matcher parens
489
+ * Added several new matchers
490
+ * Added matcher aliasing
491
+ * Added simple matcher declarations
492
+ * Added __END__
493
+ * Added yet-to-be-implemented specs
494
+ * Added loading of suites via JSpec.load
495
+
496
+ === 0.0.4 / 2008-11-03
497
+
498
+ * Added ability to pass only a description to it(), meaning not yet implemented
499
+
500
+ === 0.0.3 / 2008-10-28
501
+
502
+ * Added should_fail
503
+ * Added should_match
504
+ * Added should_not_match
505
+ * Added should_be and should_not_be
506
+
507
+ === 0.0.2 / 2008-10-28
508
+
509
+ * Fixed typo in documentation for pointing to the master repo
510
+
511
+ === 0.0.1 / 2008-10-28
512
+
513
+ * Initial release