test/propono_test.rb in propono-0.6.3 vs test/propono_test.rb in propono-0.7.0

- old
+ new

@@ -30,10 +30,15 @@ def test_listen_to_udp_calls_udp_listener UdpListener.expects(:listen).with() Propono.listen_to_udp() end + def test_listen_to_tcp_calls_tcp_listener + TcpListener.expects(:listen).with() + Propono.listen_to_tcp() + end + def test_proxy_udp_calls_listen UdpListener.expects(:listen).with() Propono.proxy_udp() end @@ -41,8 +46,21 @@ topic = "foobar" message = "message" Propono.stubs(:listen_to_udp).yields(topic, message) Publisher.expects(:publish).with(topic, message, {}) Propono.proxy_udp + end + + def test_proxy_tcp_calls_listen + TcpListener.expects(:listen).with() + Propono.proxy_tcp() + end + + def test_proxy_tcp_calls_publish_in_the_block + topic = "foobar" + message = "message" + Propono.stubs(:listen_to_tcp).yields(topic, message) + Publisher.expects(:publish).with(topic, message, {}) + Propono.proxy_tcp end end end