Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Commit

Permalink
Merge pull request #18 from jakecraige/content-for
Browse files Browse the repository at this point in the history
use contentFor to inject qunit div
  • Loading branch information
rwjblue committed Nov 19, 2014
2 parents 0c715a7 + 14652a5 commit 4e0a243
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
11 changes: 11 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict';

var path = require('path');
var fs = require('fs');

module.exports = {
name: 'Ember CLI QUnit',
Expand Down Expand Up @@ -58,5 +59,15 @@ module.exports = {
});
});
}
},

contentFor: function(type) {
if (type === 'test-body') {
return this._readTemplate('test-body');
}
},

_readTemplate: function(name) {
return fs.readFileSync(path.join(__dirname, 'templates', name + '.html'));
}
};
2 changes: 2 additions & 0 deletions templates/test-body.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<div id="qunit"></div>
<div id="qunit-fixture"></div>

0 comments on commit 4e0a243

Please sign in to comment.