Sha256: 8c23009684afcceac05ee926836d33546aa60b2d95f714f1dc5f007999f839a6

Contents?: true

Size: 520 Bytes

Versions: 1

Compression:

Stored size: 520 Bytes

Contents

require 'test_helper'

class NestedClassTest < ActiveSupport::TestCase  # :nodoc:
  module Foo
    def self.table_name_prefix
      'foo_'
    end
    class Bar < ActiveRecord::Base
      establish_connection YAML.load_file(ActiveSupport::TestCase::DATABASE_CONFIG_PATH)
    end
  end

  def test_nested_model
    Foo::Bar.connection.create_table(:foo_bars, force: true) do |t|
      t.column 'latlon', :st_point, srid: 3785
    end
    assert_empty Foo::Bar.all
    Foo::Bar.connection.drop_table(:foo_bars)
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
activerecord-postgis-adapter-3.1.0 test/nested_class_test.rb