mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-23 09:16:10 +01:00
Fasterer: Use &:symbol is faster
Calling argumentless methods within blocks is slower than using symbol to proc.
This commit is contained in:
parent
8a378aa2c4
commit
ddd9c07d3b
6 changed files with 51 additions and 51 deletions
|
|
@ -227,7 +227,7 @@ class ProjectTest < ActiveSupport::TestCase
|
|||
assert !p.stalled?, "completed projects are not stalled"
|
||||
|
||||
p.activate!
|
||||
p.todos.each{|t| t.complete!}
|
||||
p.todos.each(&:complete!)
|
||||
assert p.todos.reload.active.empty?, "project should not have active todos"
|
||||
assert p.todos.reload.deferred_or_blocked.empty?, "there should not be deferred or blocked todos"
|
||||
assert p.reload.stalled?, "project should be stalled"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue