jshoulda-tmbundle

Created: 2008-10-23 22:35
Updated: 2016-05-08 15:30

README.mdown

jShoulda TextMate Bundle

Three simple snippets to write jShoulda tests on TextMate

  • con<tab> generates a root context
  • co<tab> generates an inner context
  • sh<tab> generates a should call
  • ali<tab> writes the setWhateverAlias call for you
  • jst<tab> inserts
    • the script tags needed to use jShoulda (referencing both jsunittest.js and jshoulda.js)
    • or the div#id=testlog needed by the JsUnitTest logger
  • jsh<tab> for when you need to write jShoulda without mistakes
  • uni<tab> makes a call to unifyRunners.

Using describe/it (or any other alias) instead of context/should

Set TextMate configuration variables as needed (Textmate -> Preferences -> Advanced -> Shell Variables):

  • TM_JSHOULDA_CONTEXT to the word used to create contexts (usually "context" or "describe")
  • TM_JSHOULDA_SHOULD to the word used to create testcases (usually "should" or "it")

Customize the triggers if you think you'll feel more comfortable. By default the bundles uses "context" and "should" with triggers "con", "co" and "sh".

A better experience

Combine with the JavaScript Unit Testing TextMate bundle to obtain complete happiness.

Is it fast?

Watch this 30 seconds screencast. Say wow.

Cookies help us deliver our services. By using our services, you agree to our use of cookies Learn more