From 4dd90b83c05335005dbd20f633861340b7ed3a8d Mon Sep 17 00:00:00 2001 From: Sean Doyle Date: Mon, 8 Jun 2015 15:51:12 -0400 Subject: [PATCH] Provide better context for `subject()` deprecation The outcome of [#38][38] is undocumented. Raising a deprecation warning for calls to `this.subject` is a good start, but could be improved greatly. [38]: https://github.com/switchfly/ember-test-helpers/pull/38 --- lib/ember-test-helpers/test-module-for-component.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ember-test-helpers/test-module-for-component.js b/lib/ember-test-helpers/test-module-for-component.js index ead44e814..80dabbc63 100644 --- a/lib/ember-test-helpers/test-module-for-component.js +++ b/lib/ember-test-helpers/test-module-for-component.js @@ -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('');`. For more information, read: http://guides.emberjs.com/v2.2.0/testing/testing-components/"); }; this.setupSteps.push(this.setupComponentIntegrationTest); this.teardownSteps.unshift(this.teardownComponent);