Commit 3f66950a

mo k <mo@mokhan.ca>
2012-09-18 17:51:29
add greeting spec to get js tests in place.
1 parent 8c707ce
Changed files (1)
spec
javascripts
spec/javascripts/greeting_spec.js
@@ -0,0 +1,20 @@
+describe ("Greeting", function() {
+  beforeEach (function() {
+    sut = new Greeting();
+  });
+  describe ("when saying hello", function() {
+    it ("should say your name", function() {
+      expect(sut.greet('Mo')).toEqual('hi Mo');
+    });
+  });
+});
+var Greeting = (function(){
+  var Greeting = function(){
+    this.greet = function(name){
+      return "hi " + name;
+    };
+  };
+  return function(){
+    return new Greeting();
+  };
+})();