Sha256: ac71d4e3a13a0b9f111f9514d66d424c15eed18110fcf8cbc4393f3d0b985efb

Contents?: true

Size: 351 Bytes

Versions: 6

Compression:

Stored size: 351 Bytes

Contents

require "spec_helper"

describe UsesDatabaseYml do
  before do
    ActiveRecord::Base.send(:extend, MultiConfig::ORMs::ActiveRecord)
    UsesDatabaseYml.establish_connection
  end

  it "should be connected to the alternate database" do
    UsesDatabaseYml.connection.instance_variable_get(:@config)[:database].split('/').last.should == "db"
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
multi_config-0.1.9 spec/models/uses_database_yml_spec.rb
multi_config-0.1.8 spec/models/uses_database_yml_spec.rb
multi_config-0.1.6 spec/models/uses_database_yml_spec.rb
multi_config-0.1.1 spec/models/uses_database_yml_spec.rb
multi_config-0.1.0 spec/models/uses_database_yml_spec.rb
multi_config-0.0.1 spec/models/uses_database_yml_spec.rb