Sha256: b72c56423a591cdea6f91ba3b5aaeaec849ef6bc90fdf50fafe38208cc279824
Contents?: true
Size: 522 Bytes
Versions: 1
Compression:
Stored size: 522 Bytes
Contents
require 'fakeweb' class MockWordpressServer include FilesHelper attr_reader :host def initialize(host: 'wp.example.com') @host = host register_all end protected def register_all FakeWeb.register_uri(:get, "http://#{host}/wp-json/posts", :body => support_file("posts.json")) FakeWeb.register_uri(:get, "http://#{host}/wp-json/posts/1", :body => support_file("posts/1.json")) FakeWeb.register_uri(:get, "http://#{host}/wp-json/posts/2", :body => support_file("posts/2.json")) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
wp-api-0.0.2 | spec/support/mock_wordpress_server.rb |