Skip to content

Commit

Permalink
Merge pull request #16897 from Dhaulagiri/br-232-route
Browse files Browse the repository at this point in the history
add mocha rfc 232 route blueprint
  • Loading branch information
rwjblue authored Sep 4, 2018
2 parents ffd18c6 + 75adb68 commit be8a162
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { expect } from 'chai';
import { describe, it } from 'mocha';
import { setupTest } from 'ember-mocha';

describe('<%= friendlyTestDescription %>', function() {
setupTest();

it('exists', function() {
let route = this.owner.lookup('route:<%= dasherizedModuleName %>');
expect(route).to.be.ok;
});
});
18 changes: 18 additions & 0 deletions node-tests/blueprints/route-test-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,24 @@ describe('Blueprint: route-test', function() {
});
});
});

describe('with ember-mocha@0.14.0', function() {
beforeEach(function() {
modifyPackages([
{ name: 'ember-cli-qunit', delete: true },
{ name: 'ember-mocha', dev: true },
]);
generateFakePackageManifest('ember-mocha', '0.14.0');
});

it('route-test foo', function() {
return emberGenerateDestroy(['route-test', 'foo'], _file => {
expect(_file('tests/unit/routes/foo-test.js')).to.equal(
fixture('route-test/mocha-rfc232.js')
);
});
});
});
});

describe('in addon', function() {
Expand Down
12 changes: 12 additions & 0 deletions node-tests/fixtures/route-test/mocha-rfc232.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { expect } from 'chai';
import { describe, it } from 'mocha';
import { setupTest } from 'ember-mocha';

describe('Unit | Route | foo', function() {
setupTest();

it('exists', function() {
let route = this.owner.lookup('route:foo');
expect(route).to.be.ok;
});
});

0 comments on commit be8a162

Please sign in to comment.