Sha256: 87c0bb880e05dc9aba3699bfea09d29d1c5530a439dd7b02c4b8a3f2261fa9ca

Contents?: true

Size: 494 Bytes

Versions: 2

Compression:

Stored size: 494 Bytes

Contents

require File.expand_path("../lib/redic", File.dirname(__FILE__))

setup do
  Redic.new("unix:///tmp/redis.sock")
end

test "normal commands" do |c|
  c.call("SET", "foo", "bar")

  assert_equal "bar", c.call("GET", "foo")
end

test "pipelining" do |c|
  c.write("SET", "foo", "bar")
  c.write("GET", "foo")

  assert_equal ["OK", "bar"], c.run
end

test "multi/exec" do |c|
  c.write("MULTI")
  c.write("SET", "foo", "bar")
  c.write("EXEC")

  assert_equal ["OK", "QUEUED", ["OK"]], c.run
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
redic-0.0.4 test/unix_test.rb
redic-0.0.3 test/unix_test.rb