public
Description: Shoulda for JavaScript
Homepage: http://jshoulda.scriptia.net
Clone URL: git://github.com/choan/jshoulda.git
Click here to lend your support to: jshoulda and make a donation at www.pledgie.com !
name age message
file .gitignore Loading commit data...
file .gitmodules
file History.txt
file License.txt
file README.mdown
file Rakefile
directory config/
submodule jshoulda.tmbundle &rarr 6f849c8
directory jshoulda/
directory lib/
directory script/
directory site/
directory src/
directory tasks/
directory test/

jShoulda

jShoulda is a wrapper for JsUnitTest which allows the developer to write Shoulda-like tests.

Please visit http://jshoulda.scriptia.net for more information.

Example

context('A context', {
  setup: function() {
    // do your setup
    this.something = 1
  },
  teardown: function() {
    // do your cleaning
  }
  },
  should('run its setup function', function() {
    this.assertEqual(1, this.something);
  }),
  context('which is an inner context', function() {
    setup: function() {
      this.something += 1;
    }
    },
    should('run both setup functions', function() {
      this.assertEqual(2, this.something);
    })
  )
)();

SugarTest

Note that since March, 2009 the author has abandoned work in jShoulda in favor of SugarTest, a new library wich uses an improved and richer syntax (and still works on top of JsUnitTest).

Author, license, source code

jShoulda has been created by Choan Gálvez and is freely distributable under the terms of a MIT-style license. The source code resides in a Git repository at github.