Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 35 lines (27 sloc) 0.738 kB
113a343 @igrigorik first take on remcached wrapper (working get)
authored
1 require "spec/helper/all"
2 require "remcached"
3
4 describe Memcached do
5
6 it "should yield until connection is ready" do
24ec4a4 @igrigorik support for get, add, delete, set within remcached client
authored
7 EventMachine.run do
8 Fiber.new {
9 Memcached.connect %w(localhost)
10 Memcached.usable?.should be_true
11 EventMachine.stop
12 }.resume
13 end
14 end
113a343 @igrigorik first take on remcached wrapper (working get)
authored
15
16 it "should fire sequential memcached requests" do
17 EventMachine.run do
18 Fiber.new {
19
20 Memcached.connect %w(localhost)
24ec4a4 @igrigorik support for get, add, delete, set within remcached client
authored
21 Memcached.get(key: 'hai') do |res|
113a343 @igrigorik first take on remcached wrapper (working get)
authored
22 res[:value].should match('Not found')
23 end
24
24ec4a4 @igrigorik support for get, add, delete, set within remcached client
authored
25 Memcached.set(key: 'hai', value: 'win')
26 Memcached.add(key: 'count')
27 Memcached.delete(key: 'hai')
28
113a343 @igrigorik first take on remcached wrapper (working get)
authored
29 EventMachine.stop
30 }.resume
31 end
32 end
33
34 end
Something went wrong with that request. Please try again.