Sha256: c05bf6aa14c8bee793721251e86b5c497686775684b964ae98c38469d9c5f907
Contents?: true
Size: 825 Bytes
Versions: 4
Compression:
Stored size: 825 Bytes
Contents
RSpec.describe 'ROM::SQL::Schema::MysqlInferrer', :mysql do include_context 'database setup' before do conn.drop_table?(:test_inferrence) conn.create_table :test_inferrence do tinyint :tiny mediumint :medium end end after do conn.drop_table?(:test_inferrence) end let(:dataset) { :test_inferrence } let(:schema) { container.relations[dataset].schema } before do dataset = self.dataset conf.relation(dataset) do schema(dataset, infer: true) end end it 'can infer attributes for dataset' do source = container.relations[:test_inferrence].name expect(schema.to_h).to eql( tiny: ROM::SQL::Types::Int.optional.meta(name: :tiny, source: source), medium: ROM::SQL::Types::Int.optional.meta(name: :medium, source: source), ) end end
Version data entries
4 entries across 4 versions & 1 rubygems