Sha256: bea225b80a23acd087b07ff54cbc8e260d8f145f158a2a53e48408ac3b080e7a

Contents?: true

Size: 489 Bytes

Versions: 2

Compression:

Stored size: 489 Bytes

Contents

require 'stringio'
shared_context :site_hub do

  let(:downstream_url){'http://localhost:12345'}

  before do
    stub_request(:get, downstream_url).to_return(:body => 'hello')
  end

  let(:builder) do
    SiteHub::Builder.new.tap do |builder|
      builder.access_logger StringIO.new
      builder.error_logger StringIO.new
      builder.proxy "/endpoint" => downstream_url
    end
  end

  let(:rack_application) do
    builder.build
  end

  let :app do
    rack_application
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sitehub-0.4.2 spec/support/shared_contexts/sitehub_context.rb
sitehub-0.4.1 spec/support/shared_contexts/sitehub_context.rb