public
Fork of nathansobo/screw-unit
Description: A Javascript BDD Framework with nested describes, a convenient assertion syntax, and an intuitive test browser.
Clone URL: git://github.com/nkallen/screw-unit.git
Click here to lend your support to: screw-unit and make a donation at www.pledgie.com !
documentation
Nick Kallen (author)
Sun Jul 06 15:41:42 -0700 2008
commit  6b33c202bd9ec922861a8c3db03c01d4ecfa404a
tree    d2034c8d796493ee204b3991ba797205bf61d594
parent  e9d806c0b4704d36d2fd14b9b9bc6b893c5b69be
...
2
3
4
5
 
6
7
8
...
54
55
56
57
 
58
59
 
60
61
62
...
2
3
4
 
5
6
7
8
...
54
55
56
 
57
58
 
59
60
61
62
0
@@ -2,7 +2,7 @@
0
   <!--
0
     This file is a fully-functioning example test case. Try opening this file in Firefox, Safari,
0
     or Internet Explorer to see what a running test looks like.
0
- This file demonstrates the the components involved in writing a simple test, such as:
0
+ This file demonstrates the components involved in writing a simple test, such as:
0
       * The necessary HTML to run a test (with the required <script> and <link rel="stylesheet"> tags),
0
       * A "custom matcher" (i.e., a custom assertion) to make your tests more readable,
0
       * And, a simple test with the necessary boiler-plate code to get you up and running.
0
@@ -54,9 +54,9 @@
0
           });
0
         });
0
         
0
- describe("an undefined variable", function() {
0
+ describe("numbers", function() {
0
           // Here is a use of the custom matcher defined above.
0
- it("is not defined", function() {
0
+ it("either is or is not even", function() {
0
             expect(2).to(be_even);
0
             expect(3).to_not(be_even);
0
           });
...
101
102
103
104
 
105
106
107
 
108
109
110
...
288
289
290
291
292
293
294
295
 
 
 
 
 
296
297
298
...
101
102
103
 
104
105
106
 
107
108
109
110
...
288
289
290
 
 
 
 
 
291
292
293
294
295
296
297
298
0
@@ -101,10 +101,10 @@ A great test maximizes these features:
0
 
0
 * it provides **documentation**, explaining the intended functioning of the system as well as how the source code works;
0
 * it supports **ongoing development**, as you bit-by-bit write a failing test and make it pass;
0
-* it supports **refactoring** and **prevents regression**;
0
+* it supports later **refactoring** and **prevents regression** as you add other features;
0
 * and it **requires little modification** as the implementation of the system changes, especially changes to unrelated code.
0
 
0
-This section focuses principally on tests as documentation. **To provide documentation, as well as support future modification, a test should be readable and well organized.** Here are some recommendations on how to do it.
0
+This section focuses principally on tests as documentation. **To provide documentation, as well as support future modification, a test should be readable and well organized.** Here are some recommendations on how to do just that.
0
 
0
 ## Use Nested Describes to Express Context
0
 
0
@@ -288,11 +288,11 @@ Screw.Unit is designed from the ground-up to be extensible. For example, to add
0
 
0
 There are also events for the `loading` and `loaded` test code code, as well as just `before` and just `after` all tests are run:
0
 
0
- $(Screw)
0
- .bind('loading', function() {...})
0
- .bind('loaded', function() {...})
0
- .bind('before', function() {...})
0
- .bind('after', function() {...})
0
+ $(Screw)
0
+ .bind('loading', function() {...})
0
+ .bind('loaded', function() {...})
0
+ .bind('before', function() {...})
0
+ .bind('after', function() {...})
0
 
0
 # Download
0
 

Comments

    No one has commented yet.