This project is archived and is in readonly mode.
Adding some more tests for the new behaviour of partial collection counters
-
Frederick Cheung
Am I missing something or is the second test not duplicating the already existing test test_partial_collection_with_counter ?
Also would it not be preferable if the first test asserted what we're really interested in: that the value from :locals is taken into account, rather a side effect of it (an error being raised if :locals doesn't specify a value ?
-
Cameron Yule
Hi Frederick, thanks for the reply. You're entirely correct, I'd duped another test, and the value from :locals being taken into account is of course the logical thing to test as opposed to the error being raised.
Updated the patch with changes to reflect your suggestions, hopefully it's more suitable.
-
Pratik
- Title changed from [PATCH] Adding some more tests for the new behaviour of partial collection counters to Adding some more tests for the new behaviour of partial collection counters
-
josh
- Assigned user set to josh
-
josh
- State changed from new to open
Its really awesome that you found this. I also surprised to "good" features accidentally added by the refactoring.
However, I do get a test failure after I applied it.
test_render_partial_with_locals(ViewRenderTest): NoMethodError: undefined method `controller_path' for NilClass:Class -
josh
- Milestone cleared.
-
Cameron Yule
Hi Joshua, thanks for pointing that out!
Updated to correct the failing test (was simply an incorrect path).
-
Repository
- State changed from open to resolved
(from [2faf35cea9846fdfa1099f5dfd1589d53a3daf3b]) Added tests for partial collection counters [#766 Adding some more tests for the new behaviour of partial collection counters state:resolved] Signed-off-by: Joshua Peek josh@joshpeek.com http://github.com/rails/rails/co...
