Skip to content

Commit

Permalink
test when result data is wrapped with SimpleDelegator
Browse files Browse the repository at this point in the history
  • Loading branch information
ElvinEfendi committed Mar 1, 2024
1 parent b7b12e6 commit 0e782ce
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/test_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 0e782ce

Please sign in to comment.