This project is heavily inspired by SinonJS, but aims to providing assertions-friendly mocks in an ember-qunit testing environment.
npm install --save-dev ember-qunit-mock
import { moduleForComponent } from 'ember-qunit';
import { test } from 'ember-qunit-mock/lib/test';
moduleForComponent('my-component', {});
test('A test using mock', function (assert) {
var mock = this.mock('MockName');
mock.expect('someMethod').withArgs('arg', 10).returns(42);
// Test logic here...
}
All contributions are welcome. Submit your PRs!
git clone
this repositorynpm install
bower install
ember test
ember test --server
ember build
For more information on using ember-cli, visit http://www.ember-cli.com/.