Sha256: 2669fdc63c32b3f97319063f2a71b40d6d2fc94e6365726674e8a4986678c383
Contents?: true
Size: 810 Bytes
Versions: 15
Compression:
Stored size: 810 Bytes
Contents
require 'spec_helper' require 'rack/test' require 'async_rack_test' describe Firehose::Rack::Ping, :type => :request do include AsyncRackTest::Methods let(:app) { Firehose::Rack::Ping.new dummy_redis } let(:path) { "/test/path/#{Time.now.to_i}" } let(:deferrable) { EM::DefaultDeferrable.new } let(:dummy_redis) { double 'redis', :set => deferrable, :get => deferrable, :expire => deferrable } context 'redis is available' do before { deferrable.succeed Firehose::Rack::Ping::PingCheck::TEST_VALUE } it "should return 200" do ahead path last_response.status.should == 200 end end context 'redis is not available' do before { deferrable.fail 'some error' } it "should return 500" do ahead path last_response.status.should == 500 end end end
Version data entries
15 entries across 15 versions & 1 rubygems