Skip to content

Commit

Permalink
Adding a namespace to promote good practice.
Browse files Browse the repository at this point in the history
  • Loading branch information
ryangreenhall committed Jul 5, 2010
1 parent 01cc9eb commit ffb698f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/spec/greeter.spec.js
Expand Up @@ -3,6 +3,6 @@ describe('Greeter', function() {
load('examples/src/greeter.js');

it('greets people', function() {
expect(greeter().greet()).to(eql, 'Hello!');
expect(example.greeter().greet()).to(eql, 'Hello!');
});
});
4 changes: 3 additions & 1 deletion examples/src/greeter.js
@@ -1,4 +1,6 @@
greeter = function(){
load("examples/src/namespace.js");

example.greeter = function(){
var that = {};
that.greet = function() {
return "Hello!";
Expand Down

0 comments on commit ffb698f

Please sign in to comment.