File: interface_test.rb

package info (click to toggle)
ruby-redis-store 1.11.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 320 kB
  • sloc: ruby: 1,514; makefile: 6
file content (27 lines) | stat: -rw-r--r-- 669 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
require 'test_helper'

class InterfacedRedis < Redis
  include Redis::Store::Interface
end

describe Redis::Store::Interface do
  before do
    @r = InterfacedRedis.new
  end

  it "should get an element" do
    lambda { @r.get("key", :option => true) } # .wont_raise ArgumentError
  end

  it "should set an element" do
    lambda { @r.set("key", "value", :option => true) } # .wont_raise ArgumentError
  end

  it "should setnx an element" do
    lambda { @r.setnx("key", "value", :option => true) } # .wont_raise ArgumentError
  end

  it "should setex an element" do
    lambda { @r.setex("key", 1, "value", :option => true) } # .wont_raise ArgumentError
  end
end