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 Jun 8, 2015
1 parent 85096a5 commit cdf682d
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 @@ -37,7 +37,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.push(this.teardownComponent);
Expand Down

0 comments on commit cdf682d

Please sign in to comment.