lib/telegram/bot/updates_controller/rspec_helpers.rb in telegram-bot-0.13.0 vs lib/telegram/bot/updates_controller/rspec_helpers.rb in telegram-bot-0.13.1
- old
+ new
@@ -33,10 +33,10 @@
end
def deep_stringify(input)
case input
when Array then input.map(&method(__callee__))
- when Hash then input.transform_keys(&:to_s).transform_values(&method(__callee__))
+ when Hash then input.map { |k, v| [k.to_s, deep_stringify(v)] }.to_h
else input
end
end
# Matcher to check response. Make sure to define `let(:chat_id)`.