blob: ac827e0ae3e1def66c932de9c5a8079967996b36 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
require 'test_helper'
require 'minitest/mock'
require 'nickserver/lookup'
class TestLookup < Nickserver::Lookup
def query
yield 200, 'yeah'
end
end
class LookupTest < Minitest::Test
def test_responding
responder = Minitest::Mock.new
responder.expect :send_response, nil,
[{status: 200, content: 'yeah'}]
lookup = TestLookup.new nil
lookup.respond_with responder
responder.verify
end
end
|