Sha256: 5657c77e791d54610b852b3486ae412bc5c69f46bf84ce3cef7f704f34dd06f4
Contents?: true
Size: 677 Bytes
Versions: 2
Compression:
Stored size: 677 Bytes
Contents
require 'api_pi' set_header "api-pi-demo-header", "api-pi-example" get "http://apipi.apiary.io/tests" do test "headers" do response.header.contenttype.is "application/json" response.code.is 200 end test "body results.string" do response.body.results.string.is_a String response.body.results.string.matches /\w*/ end test "results.int" do response.body.results.int.is_an Integer end test "results" do response.body.results.has_key "string" response.body.results.lacks_key "nope" response.body.results.has_keys "string","int","here","array" end test "results.array" do response.body.results.array.includes 4 end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
api_pi-0.2.3 | example/apiary.rb |
api_pi-0.2.2 | example/apiary.rb |