Sha256: 51a1488169512df192546a9a6388b53e787f7b0d3680deaa2e74b5b52b501359
Contents?: true
Size: 861 Bytes
Versions: 2
Compression:
Stored size: 861 Bytes
Contents
$: << File.dirname(__FILE__) + '/../lib' require 'remcached' describe Memcached::Client do def run(&block) EM.run do @cl = Memcached::Client.connect('localhost', &block) end end def stop @cl.close_connection EM.stop end context "when getting stats" do before :all do @stats = {} run do @cl.stats do |result| result[:status].should == Memcached::Errors::NO_ERROR if result[:key] != '' @stats[result[:key]] = result[:value] else stop end end end end it "should have received some keys" do @stats.should include(*%w(pid uptime time version curr_connections total_connections)) end end =begin it "should keep alive" do run do EM::Timer.new(30) do stop end end end =end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
remcached-0.4.1 | spec/client_spec.rb |
remcached-0.4.0 | spec/client_spec.rb |