Permalink
Browse files

forgot to re-add tests

  • Loading branch information...
1 parent a64a977 commit fc93823e89ed35adda227eeb473c83bc098d1c14 @OhaiBBQ committed Feb 9, 2011
Showing with 16 additions and 2 deletions.
  1. +16 −2 test/test-i18n.js
View
@@ -5,9 +5,23 @@
* Time: 11:59:33 PM
* To change this template use File | Settings | File Templates.
*/
-
var i18n = require("./../index").i18n;
-exports["load"]["it does stuff"] = function() {
+exports["factory"] = {};
+exports["factory"]["creates a new instance if one isnt passed"] = function(test) {
+
+ test.equal(
+ i18n.factory("asdf", "asdf").path,
+ new i18n("asdf", "asdf").path
+ );
+ test.done();
+}
+
+exports["load"] = {};
+exports["load"]["sets the locale to module.exports.all"] = function(test) {
+ var instance = i18n.factory(__dirname + "/locales");
+ instance.load("en");
+ test.equal(instance.locale, require(__dirname + "/locales/en").all);
+ test.done();
}

0 comments on commit fc93823

Please sign in to comment.