From fb2d7e6f8f1fceefbc8964d34369a867eb8f25bb Mon Sep 17 00:00:00 2001 From: Azul Date: Sat, 2 Jul 2016 12:03:46 +0200 Subject: refactor: replace blocks/yields with returns This became possible because we now use celluloid. Celluloid handles asynchronity without the need for callbacks or blocks. --- test/unit/couch_db/source_unit_test.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'test/unit/couch_db') diff --git a/test/unit/couch_db/source_unit_test.rb b/test/unit/couch_db/source_unit_test.rb index 19ea9bc..fd07808 100644 --- a/test/unit/couch_db/source_unit_test.rb +++ b/test/unit/couch_db/source_unit_test.rb @@ -7,10 +7,9 @@ module Nickserver::CouchDB def test_query address = "nick@domain.tl" adapter = Minitest::Mock.new - adapter.expect :get, nil, + adapter.expect :get, [200, nil], [String, {query: { reduce: "false", key: "\"#{address}\"" }}] - query = Source.new(adapter) - query.query address + Source.new(adapter).query address adapter.verify end end -- cgit v1.2.3