Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide better context for subject() deprecation #57

Merged
merged 1 commit into from
Dec 9, 2015

Conversation

seanpdoyle
Copy link
Contributor

The outcome of #38 is undocumented.

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

@@ -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");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rwjblue I'm not sure about the language on this, or even if the suggestion is correct.

Once we nail down the language of this warning, I'd gladly add to the README's explanation on integration: true mode.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you remove the link, and suggest reading guides.emberjs.com's Testing -> Testing Components guide?

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
@@ -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: http://guides.emberjs.com/v2.2.0/testing/testing-components/");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kk, seems good, thank you (and sorry for crazy delay here)

rwjblue added a commit that referenced this pull request Dec 9, 2015
Provide better context for `subject()` deprecation
@rwjblue rwjblue merged commit b632138 into emberjs:master Dec 9, 2015
@seanpdoyle seanpdoyle deleted the patch-1 branch December 9, 2015 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants