diff options
author | eileencodes <eileencodes@gmail.com> | 2015-05-02 10:26:22 -0400 |
---|---|---|
committer | eileencodes <eileencodes@gmail.com> | 2015-05-02 10:45:17 -0400 |
commit | 76836ef7db8d0b1e40492c9a62f7c637718d813d (patch) | |
tree | 6c42dee86adfb116a272e49b2de205ffe0a056a5 /railties/lib/rails/tasks/framework.rake | |
parent | e260975baf5b1a54d03ecd685f62f697871b9b65 (diff) | |
download | rails-76836ef7db8d0b1e40492c9a62f7c637718d813d.tar.gz rails-76836ef7db8d0b1e40492c9a62f7c637718d813d.tar.bz2 rails-76836ef7db8d0b1e40492c9a62f7c637718d813d.zip |
Use `def before_setup` instead of `setup do`
`setup do` creates unnecessary allocations of proc objects in test
callbacks. This prevents that from happening and results in faster code.
Originally I had done this as `def setup` and all Railties tests passed.
See 044f9ab. Later it was reported there was an issue with this that
caused routes in tests to be nil because devs don't generally call
`super` in their test setups. Because of that I reverted the commit
until I could find a suitble replacement.
`before_setup` esentially does the same thing but without the
requirement that applications call `super` in their test setups.
Diffstat (limited to 'railties/lib/rails/tasks/framework.rake')
0 files changed, 0 insertions, 0 deletions