Sha256: fa67d55763980b079fdb176a9e48fc8e5ca0860af31c192c5eae75e3e70083e6
Contents?: true
Size: 486 Bytes
Versions: 6
Compression:
Stored size: 486 Bytes
Contents
# encoding: UTF-8 require File.expand_path("./helper", File.dirname(__FILE__)) unless defined?(Redic::CannotConnectError) Redic::CannotConnectError = Errno::ECONNREFUSED end test "model can define its own connection" do class B < Ohm::Model self.redis = Redic.new("redis://localhost:6379/1") end assert B.redis.url != Ohm.redis.url end test "model inherits Ohm.redis connection by default" do class C < Ohm::Model end assert_equal C.redis.url, Ohm.redis.url end
Version data entries
6 entries across 6 versions & 1 rubygems