Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Home

Manfred edited this page · 4 revisions
Clone this wiki locally

Moksi Cookbook

Simple expectations

var Person = {
  name: function() {
    return 'Alice';
  },
  age: function() {
    return 28;
  }
};

Moksi.expects(Person, 'name');
Moksi.rejects(Ajax.Request.prototype, 'initialize');

Expectations with arguments

Moksi.expects(Ajax.Request.prototype, 'initialize', {
  'with': ['/artists', {parameters: {artist_id: 12}}]
});
Something went wrong with that request. Please try again.