Skip to content
gravis edited this page Sep 14, 2010 · 1 revision

in your test_helper.rb file :


[...]
class ActiveSupport::TestCase
[...]
 def setup
    # Stub all vault requests to success
    stub.proxy(Typhoeus::Hydra).new do |hydra|
      response = Typhoeus::Response.new(:code => 200, :headers => "", :body => "OK", :time => 0.3)
      hydra.stub(:post, 'http://www.example.com').and_return(response)
      hydra
    end
  end
end

Clone this wiki locally