Sha256: b874773ac56728e69bcedee5c5e581f6f78be36a004ae1ec26f885d0b33f6c71

Contents?: true

Size: 855 Bytes

Versions: 4

Compression:

Stored size: 855 Bytes

Contents

require 'spec_helper'

describe "OracleEnhancedAdapter emulate OracleAdapter" do

  before(:all) do
    if defined?(ActiveRecord::ConnectionAdapters::OracleAdapter)
      @old_oracle_adapter = ActiveRecord::ConnectionAdapters::OracleAdapter
      ActiveRecord::ConnectionAdapters.send(:remove_const, :OracleAdapter)
    end
  end

  it "should be an OracleAdapter" do
    @conn = ActiveRecord::Base.establish_connection(CONNECTION_PARAMS.merge(:emulate_oracle_adapter => true))
    ActiveRecord::Base.connection.should_not be_nil
    ActiveRecord::Base.connection.is_a?(ActiveRecord::ConnectionAdapters::OracleAdapter).should be true
  end

  after(:all) do
    if @old_oracle_adapter
      ActiveRecord::ConnectionAdapters.send(:remove_const, :OracleAdapter)
      ActiveRecord::ConnectionAdapters::OracleAdapter = @old_oracle_adapter
    end
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
activerecord-oracle_enhanced-adapter-1.6.9 spec/active_record/connection_adapters/oracle_enhanced_emulate_oracle_adapter_spec.rb
activerecord-oracle_enhanced-adapter-1.6.8 spec/active_record/connection_adapters/oracle_enhanced_emulate_oracle_adapter_spec.rb
activerecord-oracle_enhanced-adapter-1.6.7 spec/active_record/connection_adapters/oracle_enhanced_emulate_oracle_adapter_spec.rb
activerecord-oracle_enhanced-adapter-1.6.6 spec/active_record/connection_adapters/oracle_enhanced_emulate_oracle_adapter_spec.rb