Skip to content

Commit

Permalink
Provide better context for subject() deprecation
Browse files Browse the repository at this point in the history
The outcome of [emberjs#38][38] is undocumented. 

Raising a deprecation warning for calls to `this.subject` is a good start, 
but could be improved greatly.

[38]: emberjs#38
  • Loading branch information
seanpdoyle committed Dec 9, 2015
1 parent 21472fe commit eb43ce2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ember-test-helpers/test-module-for-component.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default TestModule.extend({
this.setupSteps.push(this.setupComponentUnitTest);
} else {
this.callbacks.subject = function() {
throw new Error("component integration tests do not support `subject()`.");
throw new Error("component integration tests do not support `subject()`. Instead, render the component as if it were HTML: `this.render('<my-component foo=true>');`. For more information, read: https://github.com/switchfly/ember-test-helpers/pull/38");
};
this.setupSteps.push(this.setupComponentIntegrationTest);
this.teardownSteps.unshift(this.teardownComponent);
Expand Down

0 comments on commit eb43ce2

Please sign in to comment.