diff --git a/spec/lib/appsignal/integrations/padrino_spec.rb b/spec/lib/appsignal/integrations/padrino_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/lib/appsignal/integrations/padrino_spec.rb
+++ b/spec/lib/appsignal/integrations/padrino_spec.rb
@@ -98,7 +98,13 @@ if DependencyHelper.padrino_present?
         RSpec::Matchers.define :match_response do |expected_status, expected_content|
           match do |response|
             status, _headers, content = response
-            status == expected_status && content == [expected_content].compact
+            matches_content =
+              if expected_content.is_a?(Regexp)
+                content.join =~ expected_content
+              else
+                content == [expected_content].compact
+              end
+            status == expected_status && matches_content
           end
         end
 
@@ -142,7 +148,7 @@ if DependencyHelper.padrino_present?
               expect_a_transaction_to_be_created
               # Uses path for action name
               expect(transaction).to receive(:set_action_if_nil).with("PadrinoTestApp#unknown")
-              expect(response).to match_response(404, "GET /404")
+              expect(response).to match_response(404, %r{^GET /404})
             end
           end
Fix Padrino specs on Ruby <I>

On Ruby <I> the error response body format includes more content, that
we don't need to match on.

The error on Ruby <I> looks like this:

```
GET /<I>
  raise NotFound, \"\#{request.request_method} \#{request.path_info}\"
  ^^^^^
```

Part of #<I>