diff options
author | azul <azul@riseup.net> | 2016-07-12 10:39:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-12 10:39:58 +0200 |
commit | d7599715c6d24534dcccbe29cfc058e534039053 (patch) | |
tree | 14824b08c4d0889e9767171ac5bafe3316a607f9 /test/integration/couch_db/source_test.rb | |
parent | 27196b87e8d0ce5325381ea96ccd68ced8ee2e4d (diff) | |
parent | 6732fef4df156a02ed83f006f19f66cf567b5340 (diff) |
Merge pull request #5 from azul/celluloid
Use Celluloid, Reel and Celluloid I/O based http requests
Diffstat (limited to 'test/integration/couch_db/source_test.rb')
-rw-r--r-- | test/integration/couch_db/source_test.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/integration/couch_db/source_test.rb b/test/integration/couch_db/source_test.rb index 21e3642..cb1153e 100644 --- a/test/integration/couch_db/source_test.rb +++ b/test/integration/couch_db/source_test.rb @@ -1,6 +1,5 @@ require 'test_helper' require 'file_content' -require 'helpers/test_adapter' require 'nickserver/couch_db/source' module Nickserver::CouchDB @@ -8,12 +7,17 @@ module Nickserver::CouchDB include FileContent def test_couch_query_and_response - adapter = TestAdapter.new 200, file_content(:blue_couchdb_result) + adapter = adapter_returns 200, file_content(:blue_couchdb_result) source = Source.new adapter source.query 'blue@example.org' do |response| assert_equal 200, response.status assert_equal file_content(:blue_nickserver_result), response.content end end + + def adapter_returns(*return_values) + adapter = Minitest::Mock.new + adapter.expect :get, return_values, [String, Hash] + end end end |