Sha256: b971b4483e64ee6c06d6aeafad51344eed9994e530011872a4d67561ce6ba799

Contents?: true

Size: 640 Bytes

Versions: 2

Compression:

Stored size: 640 Bytes

Contents

require_relative '../spec_helper'

describe "Rhinestone integration", :vcr do
  it "proxies requests to rubygems.org" do
    response = nil

    EM.synchrony do
      response = Rhinestone.server.get("/")
      EM.stop
    end

    response.status.should == 200
    response.headers["Content-Type"].should_not be_nil
    response.body.should include("RubyGems.org")
  end

  it "caches the requests" do
    server = Rhinestone.server
    response_one = response_two = nil

    EM.synchrony do
      response_one = server.get("/")
      response_two = server.get("/")
      EM.stop
    end

    response_one.should == response_two
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rhinestone-0.0.2 spec/rhinestone/integration_spec.rb
rhinestone-0.0.1 spec/rhinestone/integration_spec.rb