Sha256: 80c41ad0f56b1515700c4abb21b7d227f5cc59c9c9b8d18c11d8563ba876709a

Contents?: true

Size: 503 Bytes

Versions: 5

Compression:

Stored size: 503 Bytes

Contents

require 'spec_helper'

describe ActiveRecord::Turntable::Cluster do
  before(:all) do
    reload_turntable!(File.join(File.dirname(__FILE__), "../../config/turntable.yml"))
  end

  context "When initialized" do
    before do
      establish_connection_to("test")
      truncate_shard
    end

    subject { ActiveRecord::Turntable::Cluster.new(User, ActiveRecord::Base.turntable_config[:clusters][:user_cluster]) }
    its(:klass) { should == User }
    its(:shards) { should have(3).items }
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
activerecord-turntable-1.1.2 spec/active_record/turntable/cluster_spec.rb
activerecord-turntable-1.1.1 spec/active_record/turntable/cluster_spec.rb
activerecord-turntable-1.1.0 spec/active_record/turntable/cluster_spec.rb
activerecord-turntable-1.0.1 spec/active_record/turntable/cluster_spec.rb
activerecord-turntable-1.0.0 spec/active_record/turntable/cluster_spec.rb