Sha256: ae8cfc02f9b4380d16f856082c96423de6af787ba7fd3a00b5896e4781fc9ff3

Contents?: true

Size: 931 Bytes

Versions: 15

Compression:

Stored size: 931 Bytes

Contents

require File.dirname(__FILE__) + '/spec_helper.rb'

include RR

describe ReplicationExtenders do
  before(:each) do
    Initializer.configuration = standard_config
    @@old_cache_status = ConnectionExtenders.use_db_connection_cache(false)
  end

  after(:each) do
    ConnectionExtenders.use_db_connection_cache(@@old_cache_status)
  end
  
  it "extenders should return list of registered connection extenders" do
    ReplicationExtenders.extenders.include?(:postgresql).should be_true
  end
  
  it "register should register a new connection extender" do
    ReplicationExtenders.register(:bla => :blub)
    
    ReplicationExtenders.extenders.include?(:bla).should be_true
  end
  
  it "register should replace already existing connection extenders" do
    ReplicationExtenders.register(:bla => :blub)
    ReplicationExtenders.register(:bla => :blub2)
    
    ReplicationExtenders.extenders[:bla].should == :blub2
  end
end

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
andyjeffries-rubyrep-1.2.1 spec/replication_extenders_spec.rb
rubyrep-1.2.0 spec/replication_extenders_spec.rb
rubyrep-1.1.2 spec/replication_extenders_spec.rb
rubyrep-1.1.1 spec/replication_extenders_spec.rb
rubyrep-1.1.0 spec/replication_extenders_spec.rb
rubyrep-1.0.9 spec/replication_extenders_spec.rb
rubyrep-1.0.8 spec/replication_extenders_spec.rb
rubyrep-1.0.3 spec/replication_extenders_spec.rb
rubyrep-1.0.4 spec/replication_extenders_spec.rb
rubyrep-1.0.5 spec/replication_extenders_spec.rb
rubyrep-1.0.6 spec/replication_extenders_spec.rb
rubyrep-1.0.7 spec/replication_extenders_spec.rb
rubyrep-1.0.2 spec/replication_extenders_spec.rb
rubyrep-1.0.1 spec/replication_extenders_spec.rb
rubyrep-1.0.0 spec/replication_extenders_spec.rb