mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-12-07 00:00:31 -05:00
moar info for tests
This commit is contained in:
parent
a0ac3354dc
commit
2025491cda
@ -12,7 +12,7 @@ module ResponseHelpers
|
||||
%w[header param].each do |meth|
|
||||
class_eval <<-DEFINE, __FILE__, __LINE__ + 1
|
||||
def verify_#{meth}(#{meth}s, key, expect)
|
||||
assert #{meth}s.key?(key), "#{meth}s don't contain the given key (\#{key})"
|
||||
assert #{meth}s.key?(key), "#{meth}s don't contain the given key (\"\#{key}\", headers: \#{#{meth}s})"
|
||||
value = #{meth}s[key]
|
||||
if value.respond_to?(:start_with?)
|
||||
assert value.start_with?(expect), "#{meth} assertion failed: \#{key}=\#{value} (expected: \#{expect}})"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user