diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2018-09-20 16:18:04 +0300 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2018-10-08 16:19:12 +0300 |
commit | 4c1dc31051fb741bbd6daff4b5c1dcb166d85eeb (patch) | |
tree | f47f5d5bec9e2f13d8904d60341e32d7c57ebedd /spec/finders/todos_finder_spec.rb | |
parent | c616327c1221dc91318a35769e01ab6932d497ea (diff) |
Clean up ActiveRecord code in TodosFinder
This refactors the TodosFinder finder according to the new code reuse
rules, as enforced by the CodeReuse cops. I also changed some of the
methods to use regular if statements, instead of assignments and/or
early returns. This results in a more natural flow when reading the
code, and it makes it harder to accidentally return the wrong result.
Diffstat (limited to 'spec/finders/todos_finder_spec.rb')
-rw-r--r-- | spec/finders/todos_finder_spec.rb | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/spec/finders/todos_finder_spec.rb b/spec/finders/todos_finder_spec.rb index 7f7cfb2cb98..64289224933 100644 --- a/spec/finders/todos_finder_spec.rb +++ b/spec/finders/todos_finder_spec.rb @@ -105,7 +105,6 @@ describe TodosFinder do todos = finder.new(user, { sort: 'priority' }).execute - puts todos.to_sql expect(todos).to eq([todo_3, todo_5, todo_4, todo_2, todo_1]) end end |