summaryrefslogtreecommitdiff
path: root/spec/javascripts
diff options
context:
space:
mode:
authormo k <mo@mokhan.ca>2012-09-18 11:51:29 -0600
committermo k <mo@mokhan.ca>2012-09-18 11:51:29 -0600
commit3f66950a5398cdd4fa07192c3d5bbfe9b042098d (patch)
tree8963e3288d57f1c46a91b003c2cf1a4d2ae837b5 /spec/javascripts
parent8c707cec684025fd0fec0f6dd7b4b6b8686ffd90 (diff)
add greeting spec to get js tests in place.
Diffstat (limited to 'spec/javascripts')
-rw-r--r--spec/javascripts/greeting_spec.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/javascripts/greeting_spec.js b/spec/javascripts/greeting_spec.js
new file mode 100644
index 00000000..4bd162ea
--- /dev/null
+++ b/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();
+ };
+})();