Sha256: 89adef2c11467a8fda91caa531cb243c6f824c6734338d71755fd68aa5c4fb23

Contents?: true

Size: 532 Bytes

Versions: 1

Compression:

Stored size: 532 Bytes

Contents

# frozen_string_literal: true
RSpec.shared_context "without cached response" do
  let(:cache) { null_cache }

  before do
    subject.cache = cache
  end

  def null_cache
    double("TwitterJekyll::NullCache", read: nil, write: nil)
  end
end

RSpec.shared_context "with any oembed request and response" do
  let(:options) { "oembed https://twitter.com/twitter_user/status/12345" }
  let(:response) { OpenStruct.new(html: "<p>tweet html</p>") }

  before do
    allow(api_client).to receive(:oembed).and_return(response)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jekyll-twitter-plugin-1.4.0 spec/support/shared_contexts.rb