Sha256: 4eab57733208aa09c0934cfc56265b0f3b8333c113914dea56193eb8af3549db
Contents?: true
Size: 700 Bytes
Versions: 1
Compression:
Stored size: 700 Bytes
Contents
Mocktra ==== A webmock DSL using sinatra. Installation ---- $ gem install mocktra Examples ---- require 'mocktra' # define stub Mocktra('www.example.com') do get '/foo' do 'FOO!!' end post '/foo' do params.inspect end end # test it require 'httpclient' client = HTTPClient.new res = client.get("http://www.example.com/foo") p res.body #=> "FOO!!" res = client.post("http://www.example.com/foo", 'bar' => 'baz') p res.body #=> "{\"bar\"=>\"baz\"}" Notice ---- Mocktra calls `WebMock.allow\_net\_connect!` when loading. Copyright ---- Copyright (c) 2012 jugyo, released under the MIT license.
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mocktra-1.0.0 | README.md |