Permalink
Browse files

documentation

  • Loading branch information...
1 parent e9d806c commit 6b33c202bd9ec922861a8c3db03c01d4ecfa404a Nick Kallen committed Jul 6, 2008
Showing with 10 additions and 10 deletions.
  1. +3 −3 EXAMPLE.html
  2. +7 −7 README.markdown
View
@@ -2,7 +2,7 @@
<!--
This file is a fully-functioning example test case. Try opening this file in Firefox, Safari,
or Internet Explorer to see what a running test looks like.
- This file demonstrates the the components involved in writing a simple test, such as:
+ This file demonstrates the components involved in writing a simple test, such as:
* The necessary HTML to run a test (with the required <script> and <link rel="stylesheet"> tags),
* A "custom matcher" (i.e., a custom assertion) to make your tests more readable,
* And, a simple test with the necessary boiler-plate code to get you up and running.
@@ -54,9 +54,9 @@
});
});
- describe("an undefined variable", function() {
+ describe("numbers", function() {
// Here is a use of the custom matcher defined above.
- it("is not defined", function() {
+ it("either is or is not even", function() {
expect(2).to(be_even);
expect(3).to_not(be_even);
});
View
@@ -101,10 +101,10 @@ A great test maximizes these features:
* it provides **documentation**, explaining the intended functioning of the system as well as how the source code works;
* it supports **ongoing development**, as you bit-by-bit write a failing test and make it pass;
-* it supports **refactoring** and **prevents regression**;
+* it supports later **refactoring** and **prevents regression** as you add other features;
* and it **requires little modification** as the implementation of the system changes, especially changes to unrelated code.
-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.
+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.
## Use Nested Describes to Express Context
@@ -288,11 +288,11 @@ Screw.Unit is designed from the ground-up to be extensible. For example, to add
There are also events for the `loading` and `loaded` test code code, as well as just `before` and just `after` all tests are run:
- $(Screw)
- .bind('loading', function() {...})
- .bind('loaded', function() {...})
- .bind('before', function() {...})
- .bind('after', function() {...})
+ $(Screw)
+ .bind('loading', function() {...})
+ .bind('loaded', function() {...})
+ .bind('before', function() {...})
+ .bind('after', function() {...})
# Download

0 comments on commit 6b33c20

Please sign in to comment.