README.rdoc in visionmedia-jspec-2.6.0 vs README.rdoc in visionmedia-jspec-2.7.0

- old
+ new

@@ -12,10 +12,11 @@ * Framework / DOM independent * Modular via JSpec Module's and hooks * Rhino support * Node.js support * Async support +* Fixture support * Ruby JavaScript testing server * Nested describes * Does not pollute core object prototypes * Cascading before/after/before_each/after_each hooks * Extremely simple and intuitive matcher declaration @@ -376,9 +377,26 @@ JSpec .exec('...') .run({ formatter : JSpec.formatters.Terminal }) .report() + +== Fixtures + +The fixture() utility function may be used in order to load arbitrary file contents +for use with your specifications. JSpec will resolve fixture('data') in the following +manor: + + - 'data' + - 'spec/data' + - 'spec/fixtures/data' + - 'spec/fixtures/data.html' + +So if the file 'spec/fixtures/data.html' exists, we can simply use fixture('data'), +where as 'spec/fixtures/xml/data.xml' must be specified with fixture('xml/data.xml'). + +If you prefer not to store fixtures in the 'fixtures' directory you must be more specific +with the path supplied. == Custom Matchers First lets create a simple equality matcher. In the case below JSpec is smart enough to realize this is simply a binary operator, and simply transforms this into 'actual === expected'