File: interface_test.rb

package info (click to toggle)
ruby-redis-store 1.1.6-1%2Bdeb9u1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 284 kB
  • sloc: ruby: 909; makefile: 4
file content (27 lines) | stat: -rw-r--r-- 665 bytes parent folder | download | duplicates (2)
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