File: backend_redis_test.rb

package info (click to toggle)
ruby-classifier-reborn 2.2.0-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,424 kB
  • sloc: ruby: 2,021; makefile: 7
file content (21 lines) | stat: -rw-r--r-- 469 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# encoding: utf-8

require File.dirname(__FILE__) + '/../test_helper'
require_relative './backend_common_tests'

class BackendRedisTest < Minitest::Test
  include BackendCommonTests

  def setup
    begin
      @backend = ClassifierReborn::BayesRedisBackend.new
      @backend.instance_variable_get(:@redis).config(:set, "save", "")
    rescue Redis::CannotConnectError => e
      skip(e)
    end
  end

  def teardown
    @backend.reset if defined? @backend
  end
end