This project is archived and is in readonly mode.
Clean up the list of excluded ivars that get added to assigns in a view test case
Reported by David Chelimsky | June 22nd, 2010 @ 03:58 PM
ActionView::TestCase copies instance variables from the test
case to view in the _assigns
method. It excludes ivars
that are set up and used by the test case, but the list of ivars
currently includes a number of variables that are outdated (no
longer exist) and excludes some new variables.
Patch forthcoming to clean that up.
Comments and changes to this ticket
-
David Chelimsky June 22nd, 2010 @ 04:02 PM
- Assigned user set to José Valim
Patch: http://github.com/dchelimsky/rails/commit/7378fa34be0b5c6945ae8f407...
Note that I didn't add any tests for this. Doing so would create a binding between the tests (they'd have to name all the ivars explicitly) and the implementation. The only risk is that somebody wants to use an instance variable name that is used internally by test case, which is a deeper design question than the specific contents of this list.
-
Repository June 22nd, 2010 @ 04:16 PM
- State changed from new to resolved
(from [f29fb0dd9ef3e563f9813ee09e7a9b826f70e3f2]) update the list of instance variables that are excluded from assigns in view tests
[#4930 state:resolved]
Signed-off-by: José Valim jose.valim@gmail.com
http://github.com/rails/rails/commit/f29fb0dd9ef3e563f9813ee09e7a9b...
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Referenced by
- 4930 Clean up the list of excluded ivars that get added to assigns in a view test case [#4930 state:resolved]