title: How would I use VCR (with WebMock) in this scenario?
body: <p>I'm developing a DSL for building API wrappers, named <a href="https://github.com/rafalchmiel/hendrix/tree/0.1.0" rel="nofollow">Hendrix</a>. I am having problems with the testing of the DSL. As it is a API wrapper, it needs to interact with external services. I am not sure how to approach this in terms of testing. I'm using RSpec and tried configuring VCR with WebMock, but no luck. How am I supposed to test this particular scenario if I don't have direct access to what request is being made?</p>
  
  <p>This is my <code>spec_helper.rb</code>:</p>
  
  <pre><code>$VERBOSE = nil
  
  require 'simplecov'
  require 'coveralls'
  
  SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
    SimpleCov::Formatter::HTMLFormatter,
    Coveralls::SimpleCov::Formatter
  ]
  SimpleCov.start { add_filter '/spec/' }
  
  lib = File.expand_path('../lib', __FILE__)
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
  require 'hendrix'
  
  require 'vcr'
  
  VCR.configure do |c|
    c.cassette_library_dir = 'spec/cassettes'
    c.hook_into :webmock
  end
  
  RSpec.configure do |config|
    config.treat_symbols_as_metadata_keys_with_true_values = true
    config.run_all_when_everything_filtered = true
    config.filter_run :focus
    config.order = 'random'
    config.extend VCR::RSpec::Macros
  end
  </code></pre>
  
  <p>The project is in its early stages (working towards version 0.1.0 at the moment). The syntax of the DSL is as follows:</p>
  
  <pre><code>require 'hendrix'
  
  Hendrix.build 'Jimi' do
    base 'https://api.github.com'
  
    client :issues do
      action :issue, '/repos/:owner/:repo/issues/:number'
    end
  end
  
  Jimi.issue('rafalchmiel', 'hendrix', 1)
    # =&gt; {"url"=&gt;"https://api.github.com/repos/rafalchmiel/hendrix/issues/1",
    #  "labels_url"=&gt; ...
  Jimi.issue('rafalchmiel', 'hendrix', 1).title
    # =&gt; "Implement parameters in actions"
  </code></pre>
  
  <p>In most specs, I'm testing what the methods from the master module (in this case <code>Jimi.issue</code> etc) return and whether it is in a <code>Hashie::Mash</code> format. How would I test this? I don't know where to start.</p>