Sha256: e440a40ae5692eb96dc2245192ed9372553d1e61f518f33de012b4cec53b4d60

Contents?: true

Size: 334 Bytes

Versions: 15

Compression:

Stored size: 334 Bytes

Contents

require_relative 'helper'

test "model inherits Ohm.redis connection by default" do
  class C < Ohm::Model
  end

  assert_equal C.redis.url, Ohm.redis.url
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

Version data entries

15 entries across 15 versions & 3 rubygems

Version Path
ohm_util-0.1 test/connection.rb
ohm-3.1.1 test/connection.rb
ohm-3.1.0 test/connection.rb
ohm-3.0.3 test/connection.rb
ohm-3.0.2 test/connection.rb
ohm-3.0.1 test/connection.rb
ohm-3.0.0 test/connection.rb
ohm-2.3.0 test/connection.rb
ohm-2.2.1 test/connection.rb
sohm-0.0.1 test/connection.rb
ohm-2.2.0 test/connection.rb
ohm-2.1.0 test/connection.rb
ohm-2.0.1 test/connection.rb
ohm-2.0.0 test/connection.rb
ohm-2.0.0.rc2 test/connection.rb