Call the external service and make sure we’re processing the result

(Works with Test::Unit too.)

Making things easier with VCR

It’s tedious to use curl to get all those canned responses. Fortunately, we don’t have to.

https://github.com/myronmarston/vcr

gem install vcr

Put this in a Cucumber support file (also works with RSpec and Test::Unit)

require 'vcr' VCR.configure do |c| c.cassette_library_dir = 'fixtures/vcr_cassettes' c.hook_into :webmock end VCR.cucumber_tags do |t| t.tag '@vcr', :use_scenario_name => true end

Tag your scenarios with @vcr or call VCR directly in your steps

And then, just run your tests as normal—no more messing with curl!