Hi Justin,
The HTTP code that is in there is specifically for publishing the contract to the pact broker, nothing to do with the execution of the tests.
In both the JVM and Ruby versions, when you declare the request and response using the Pact DSL, ("uponReceiving" and "willRespondWith") you're building a structure that has two purposes - 1. it provides the concrete example request and response used in the tests, and 2. defines how to validate the the actual request/response against the expected request/response. The two different uses of this structure
The file expected_data_from_collector.rb declares an object graph using the Pact DSL. This is going to be used to create the concrete example and the contract. This could be declared inline, but for easier maintenance, and to allow the contract publishing code to easily access it, it's in a separate file.
The file consumer.rb takes that object graph declared in expected_data_from_collector.rb, and generates an example JSON document from it (that's what FixtureHelpers.load_generated_pact_fixture does). It then uses that JSON document in a test to show that it can handle the document we expect.
The file consumer_publish_contract.rb shows how we take that same object graph and turn it into the JSON Pact-like contract, and publish it to the pact broker.
The file fixture_helpers.rb shows the code that is used to turn the object graph declared using the Pact DSL into the example structure.
The file z_provider.rb contains a test that uses the contract that we retrieve from the pact broker. It shows that the output that we produce contains all the data that the consumer expects (of course, it may contain extra data without it being a problem).
Hope this clarifies the code a bit better, I know that reading an example in a language that you don't use much is not terribly helpful! Let me know if you have further questions.
Cheers,
Beth