Commit 3f66950a
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();
+ };
+})();