Sha256: 00081cc074c37069b953e388baea4330ba498098f7d3eb48079b11b590dc6b7b

Contents?: true

Size: 645 Bytes

Versions: 2

Compression:

Stored size: 645 Bytes

Contents

require 'spec_helper'

describe 'Field' do

  it 'should have a name' do
    expect(Schemaless::Field.new('cc', Integer).name).to eq('cc')
  end

  it 'should have a type' do
    expect(Schemaless::Field.new('cc', Integer).type).to eq(:integer)
  end

  describe 'Field mapping' do

    it 'should map field integer' do
      expect(Schemaless::Field.new('cc', Integer).type).to eq(:integer)
    end

    it 'should map field decimal' do
      expect(Schemaless::Field.new('cc', BigDecimal).type).to eq(:decimal)
    end

    it 'should map field float' do
      expect(Schemaless::Field.new('cc', Float).type).to eq(:float)
    end

  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
schemaless-0.0.5 spec/schemaless/field_spec.rb
schemaless-0.0.3 spec/schemaless/field_spec.rb