oesmith / puffing-billy

A rewriting web proxy for testing interactions between your browser and external sites. Works with ruby + rspec.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Minitest support

elfassy opened this issue · comments

Does this gem work with minitest? Thanks

Doesn't appear to out of the box, but take a look at the rspec.rb and cucumber.rb files for an example of what's needed to add support. Essentially just need a way to start and reset it at specific spots of a test run.

@elfassy, looks like puffing-billy will work with minitest-rails-capybara. You just need to specify the driver to use one of the *_billy versions.

Please try it out and report back. If it works well, we can update the README with a Minitest Usage section.

I gave this a shot and extracted this gist... https://gist.github.com/sauy7/1b081266dd453a1b737b

It could probably use some tidying up but it might help someone get started.

Thanks @sauy7, I'll add that link to the README.

I'm trying to get billy working with minitest. I keep getting uninitialized constant Billy::RequestHandler::Forwardable (NameError) just trying to do require 'billy', even straight from irb.

Looks like adding require 'forwardable' to .../puffing-billy-0.5.1/lib/billy/handlers/request_handler.rb fixed it. This may be another issue regarding ruby version compatibility. I'm using ruby 2.2.1

Good catch, looks like that should be a runtime dependency.

Please submit a PR if you get a chance. Thanks!

This seems a separate issue. I'll create a new one. I did get puffing-billy working with minitest, fyi.

I opened #108 for the problem I was running into integrating this with minitest

Update to v0.6.1 for this support.

Could you update the docs with the setup for MiniTest? 🥲