From 0e782cef8e92a3877490a6c1fbf08c74372b4d55 Mon Sep 17 00:00:00 2001 From: Elvin Efendiev Date: Thu, 29 Feb 2024 19:40:42 -0500 Subject: [PATCH] test when result data is wrapped with SimpleDelegator --- test/test_client.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/test_client.rb b/test/test_client.rb index 85317fe..65177b2 100644 --- a/test/test_client.rb +++ b/test/test_client.rb @@ -871,5 +871,17 @@ def equal assert_equal "things", result.data.things assert_equal "equal", result.data.equal assert_predicate result.data, :equal? + + wrapped_data = ResultDataWrapper.new(result.data) + assert_equal "method", wrapped_data.__getobj__.method + assert_equal "method", wrapped_data.method + end + + private + + class ResultDataWrapper < SimpleDelegator + def initialize(value) + super(value) + end end end