- 授权协议: 未知
- 开发语言: Ruby
- 操作系统: 跨平台
- 软件首页: https://rubygems.org/gems/mimic
- 软件文档: http://www.rubydoc.info/gems/mimic/0.4.3
软件介绍
Mimic, 轻量级Web服务测试桩
开发语言:Ruby
注册一个Web请求测试桩:
Mimic.mimic.get("/some/path").returning("hello world")使用RestClient访问该请求:
$ RestClient.get("http://www.example.com:11988/some/path") # => 200 | hello world注册多个请求测试桩; 注意你可以用不同得方法为同一个url注册多个请求。
Mimic.mimic do
get("/some/path").returning("Hello World", 200)
get("/some/other/path").returning("Redirecting...", 301, {"Location" => "somewhere else"})
post("/some/path").returning("Created!", 201)
end
