Sha256: 9180b2b0f53d0032caf714702b1375b2fa3dd42bad99193d6597bde52ffa6791
Contents?: true
Size: 457 Bytes
Versions: 2
Compression:
Stored size: 457 Bytes
Contents
require 'spec_helper' describe Mocktra do it 'works' do Mocktra('www.example.com') do get '/foo' do 'FOO!!' end post '/foo' do params.inspect end end require 'httpclient' client = HTTPClient.new res = client.get("http://www.example.com/foo") res.body.should == 'FOO!!' res = client.post("http://www.example.com/foo", 'bar' => 'baz') res.body.should == '{"bar"=>"baz"}' end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
mocktra-1.0.2 | spec/mocktra_spec.rb |
mocktra-1.0.1 | spec/mocktra_spec.rb |