This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
moksi /
| name | age | message | |
|---|---|---|---|
| |
LICENSE | Wed May 06 10:25:23 -0700 2009 | |
| |
README.markdown | Mon Apr 20 23:38:45 -0700 2009 | |
| |
Rakefile | Sun Apr 19 05:06:54 -0700 2009 | |
| |
javascripts/ | Wed May 06 10:25:23 -0700 2009 | |
| |
test/ | Mon May 04 01:55:13 -0700 2009 |
README.markdown
Moksi
Moksi is a stubbing and mocking library for JavaScript.
var Person = {
name: function() {
return 'Alice';
},
age: function() {
return 28;
}
}
// Stub the person's name.
Moksi.stub(Person, 'name', function() {
return 'Bob';
});
Person.name() == 'Bob';
// Expect age to be called
Moksi.expects(Person, 'age');
Moksi.rejects(Person, 'name');
Person.age();
Moksi.assertExpectations(this);
// Revert all stubs and expectations
Moksi.revert();
Person.name() == 'Alice';







