0.0.9 • Published 10 years ago

ember-qunit-mock v0.0.9

Weekly downloads
1
License
MIT
Repository
github
Last release
10 years ago

ember-qunit-mock

NPM Version Build Status

This project is heavily inspired by SinonJS, but aims to providing assertions-friendly mocks in an ember-qunit testing environment.

Use it!

Installation

npm install --save-dev ember-qunit-mock

Mocking methods in tests

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...
}

Contribute

All contributions are welcome. Submit your PRs!

Get project

  • git clone this repository
  • npm install
  • bower install

Running Tests

  • ember test
  • ember test --server

Building

  • ember build

For more information on using ember-cli, visit http://www.ember-cli.com/.

0.0.9

10 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago