Sha256: 9ba76be5e5c3da4d9771eadd9d3fa299b6c4f64cb7ce3a51582a065b863cba5c

Contents?: true

Size: 527 Bytes

Versions: 3

Compression:

Stored size: 527 Bytes

Contents

require 'spec_helper'

describe ActiveRecord::Base, "methods" do
  before do
    ActiveRecord::Base.send(:include, MultiConfig::ORMs::ActiveRecord)
  end

  it "has configurations" do
    ActiveRecord::Base.configurations.should_not == {}
  end

  it "has multi config methods" do
    ActiveRecord::Base.singleton_methods.map(&:to_sym).should include(:'config_file=')
  end

  it "has @@db_config class variable set" do
    ActiveRecord::Base.send(:class_variable_get, '@@_multi_config_db_configs').should == {}
  end

end




Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
multi_config-1.0.0 spec/active_record_spec.rb
multi_config-0.2.2 spec/active_record_spec.rb
multi_config-0.2.0 spec/active_record_spec.rb