Testing a Middleman extension gem with fixtures

I’m in the process of writing a Middleman Extension that auto-generates Epub and PDF versions of a given website. I’m planning to distribute the finished product as a Ruby gem, and I want to follow best practices and include a decent test suite with the gem.

Since so many functions are dependent on hooking into an existing Middleman app, I imagine I’ll need to include some kind of simple Middleman project as a fixture to test against.

I know that a lot of gems contain a top-level fixtures directory, but that’s about as far as I understand how to go… Would I just put an entire Middleman project here? Are there any guidelines on how to load/run a fixture app like this within the context of a test suite (I’m using Rspec, but any examples in any framework would be helpful)? I’m pretty new to the world of ruby testing.

If anyone has done something similar and can share some experience, it would be really helpful. Thanks!