fix CI script and assertion helper for headers

This commit is contained in:
HoneyryderChuck 2022-01-14 02:13:09 +02:00
parent 59ac7d8bca
commit 6369d9af72
2 changed files with 2 additions and 2 deletions

View File

@ -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) # def verify_header(headers, key, expect)
assert #{meth}s.key?(key), "#{meth}s don't contain the given key (\"\#{key.to_s}\", headers: \#{#{meth}s})" # assert headers.key?(key), "headers ...
assert #{meth}s.key?(key), "#{meth}s don't contain the given key ('\#{key}', headers: \#{#{meth}s})" # assert headers.key?(key), "headers ...
value = #{meth}s[key] # value = headers[key]
if value.respond_to?(:start_with?) # if value.respond_to?(:start_with?)
assert value.start_with?(expect), "#{meth} assertion failed: \#{key}=\#{value} (expected: \#{expect}})" # assert value.start_with?(expect), "headers assertion failed: ...

View File

@ -69,7 +69,7 @@ echo ' Success: Reached S3'
export SSL_CERT_FILE=/home/test/support/ci/certs/ca-bundle.crt
if [[ ${RUBY_VERSION:0:1} = "3" ]] && ![[ $RUBYOPT =~ "jit" ]]; then
if [[ ${RUBY_VERSION:0:1} = "3" ]] && [[ ! $RUBYOPT =~ "jit" ]]; then
echo "running runtime type checking..."
export RUBYOPT="$RUBYOPT -rbundler/setup -rrbs/test/setup"
export RBS_TEST_RAISE=true