Skip to content

Commit 0d7de17

Browse files
author
Robert Jackson
committed
Add failing tests for custom subject.
1 parent 004e03e commit 0d7de17

2 files changed

Lines changed: 24 additions & 0 deletions

File tree

__testfixtures__/ember-qunit-codemod/subject.input.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,13 @@ test('has some thing', function (assert) {
5555
test('has another thing', function (assert) {
5656
let subject = this.subject({ size: 'big' });
5757
});
58+
59+
moduleFor('service:foo', {
60+
subject() {
61+
return derp();
62+
}
63+
});
64+
65+
test('can use custom subject', function(assert) {
66+
let subject = this.subject();
67+
});

__testfixtures__/ember-qunit-codemod/subject.output.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,17 @@ module('Unit | Component | FooBar', function(hooks) {
5656
let subject = this.owner.factoryFor('component:foo-bar').create({ size: 'big' });
5757
});
5858
});
59+
60+
module('service:foo', function(hooks) {
61+
setupTest(hooks);
62+
63+
hooks.beforeEach(function() {
64+
this.subject = function() {
65+
return derp();
66+
};
67+
});
68+
69+
test('can use custom subject', function(assert) {
70+
let subject = this.subject();
71+
});
72+
});

0 commit comments

Comments
 (0)