Sha256: 8c1eb00f6330ff1b88261729ef9841e16411b91d35489e60975501be1ad65691

Contents?: true

Size: 915 Bytes

Versions: 3

Compression:

Stored size: 915 Bytes

Contents

require 'json'

module Spinach
  module Fixtures
    def root_response
      '{
          "_links": {
              "self": { "href": "/" },
              "posts": { "href": "/posts" },
              "search": { "href": "/search{?q}", "templated": true },
              "api:authors": { "href": "/authors" }
          }
      }'
    end

    def posts_response
      '{
          "_links": {
            "self": { "href": "/posts" },
            "last_post": {"href": "/posts/1"}
          },
          "total_posts": "9"
      }'
    end

    def post_response
      '{
          "_links": {
            "self": { "href": "/posts/1" }
          },
          "title": "My first blog post",
          "body":  "Lorem ipsum dolor sit amet",
          "_embedded": {
            "comments": [
              {
                "title": "Some comment"
              }
            ]
          }
      }'
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
hyperclient-0.7.0 features/support/fixtures.rb
hyperclient-0.6.1 features/support/fixtures.rb
hyperclient-0.5.0 features/support/fixtures.rb