Sha256: 909ca77392d4415a47c57b241ee9bcb6766422fe8b5270a3585865ae63d69c57
Contents?: true
Size: 675 Bytes
Versions: 4
Compression:
Stored size: 675 Bytes
Contents
$LOAD_PATH.unshift(File.dirname(__FILE__)) $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) require 'em-net-http' require 'time' require 'spec' require 'spec/autorun' require 'mimic' Spec::Runner.configure do |config| config.before(:all) do Mimic.mimic do Net::HTTPResponse::CODE_TO_OBJ.each do |code, klass| get("/code/#{code}").returning("#{code} #{klass.name}", code.to_i, {}) end get('/hello').returning('Hello World!', 200, {'Content-Type'=>'text/plain'}) post('/testpost') do "You said #{request.body.read}." end end end config.after(:all) do Mimic.cleanup! end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
em-net-http-0.2.5 | spec/spec_helper.rb |
em-net-http-0.2.4 | spec/spec_helper.rb |
em-net-http-0.2.3 | spec/spec_helper.rb |
em-net-http-0.2.0 | spec/spec_helper.rb |