aboutsummaryrefslogtreecommitdiffstats
path: root/test/utils
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2015-11-09 19:07:21 +0900
committerKazuki Yamaguchi <k@rhe.jp>2015-11-09 19:07:21 +0900
commit11be104f7ac9e2fe91bd5f82a1bb2489692cdce8 (patch)
treea3b99e935d6ad125dcac6ff657d88dd8d14f0381 /test/utils
parent4b9266ad29d6f8b344ea73b74b0184026902ed0f (diff)
downloadplum-11be104f7ac9e2fe91bd5f82a1bb2489692cdce8.tar.gz
rename {Connection,Stream}Error to Remote{Connection,Stream}Error and create Local*Error
Diffstat (limited to 'test/utils')
-rw-r--r--test/utils/assertions.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/test/utils/assertions.rb b/test/utils/assertions.rb
index 71928ed..746d475 100644
--- a/test/utils/assertions.rb
+++ b/test/utils/assertions.rb
@@ -1,21 +1,21 @@
module CustomAssertions
def assert_connection_error(type, &blk)
- assert_http_error(Plum::ConnectionError, type, &blk)
+ assert_http_error(Plum::RemoteConnectionError, type, &blk)
end
def assert_stream_error(type, &blk)
- assert_http_error(Plum::StreamError, type, &blk)
+ assert_http_error(Plum::RemoteStreamError, type, &blk)
end
def assert_no_error(stream: nil, connection: nil, &blk)
- Plum::ConnectionError.reset
- Plum::StreamError.reset
+ Plum::RemoteConnectionError.reset
+ Plum::RemoteStreamError.reset
begin
blk.call
- rescue Plum::HTTPError
+ rescue Plum::RemoteHTTPError
end
- assert_nil(Plum::StreamError.last, "No stream error expected but raised: #{Plum::StreamError.last}")
- assert_nil(Plum::ConnectionError.last, "No connection error expected but raised: #{Plum::ConnectionError.last}")
+ assert_nil(Plum::RemoteStreamError.last, "No stream error expected but raised: #{Plum::RemoteStreamError.last}")
+ assert_nil(Plum::RemoteConnectionError.last, "No connection error expected but raised: #{Plum::RemoteConnectionError.last}")
end
def assert_frame(frame, **args)
@@ -56,5 +56,5 @@ module LastErrorExtension
base.reset
end
end
-Plum::ConnectionError.__send__(:prepend, LastErrorExtension)
-Plum::StreamError.__send__(:prepend, LastErrorExtension)
+Plum::RemoteConnectionError.__send__(:prepend, LastErrorExtension)
+Plum::RemoteStreamError.__send__(:prepend, LastErrorExtension)