github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

choan / jshoulda

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 22
    • 1
  • Source
  • Commits
  • Network (1)
  • Issues (0)
  • Downloads (4)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (2)
    • master ✓
    • merge_methods
  • Tags (4)
    • v1.2.1
    • v1.2
    • v1.1
    • v1.0.1
Sending Request…
Click here to lend your support to: jshoulda and make a donation at www.pledgie.com ! Edit Pledgie Setup

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

Shoulda for JavaScript — Read more

  cancel

http://jshoulda.scriptia.net

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Added notes about SugarTest 
choan (author)
Sun Mar 22 16:29:34 -0700 2009
commit  d920d1a9a1db3822c1ea9e2ce64cea87434de449
tree    0ba937003a8d1a78bfeeff4196e612db6ee58916
parent  68235cef8f1a36cdf87cc730477c172b90f887c3
jshoulda /
name age
history
message
file .gitignore Thu Mar 05 17:42:37 -0800 2009 Deleted and ignored the dist directory [choan]
file .gitmodules Thu Oct 23 15:42:36 -0700 2008 jshoulda.tmbundle as a submodule [choan]
file History.txt Loading commit data...
file License.txt Tue Oct 07 14:56:16 -0700 2008 Import from mercurial repository [choan]
file README.mdown Sun Mar 22 16:29:34 -0700 2009 Added notes about SugarTest [choan]
file Rakefile Tue Feb 24 12:25:22 -0800 2009 Updated version [choan]
directory config/ Tue Oct 07 14:56:16 -0700 2008 Import from mercurial repository [choan]
submodule jshoulda.tmbundle - 6f849c8
directory jshoulda/
directory lib/
directory script/
directory site/
directory src/ Tue Feb 24 12:22:16 -0800 2009 Style configuration [choan]
directory tasks/ Sun Nov 23 12:32:04 -0800 2008 Added downloadable package with jsunittest and ... [choan]
directory test/ Tue Feb 24 12:22:16 -0800 2009 Style configuration [choan]
README.mdown

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.

Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server