Sha256: 43ce2d44e165ea1dcbf04072a17b98b88e912872ce832da697df60b9bfeceaf0

Contents?: true

Size: 736 Bytes

Versions: 32

Compression:

Stored size: 736 Bytes

Contents

require 'spec_helper'

describe GroupDocs::DataSource::Field do

  it_behaves_like GroupDocs::Api::Entity

  it { should have_accessor(:name)   }
  it { should have_accessor(:type)   }
  it { should have_accessor(:values) }

  describe '#type=' do
    it 'saves type in machine readable format if symbol is passed' do
      subject.type = :binary
      subject.instance_variable_get(:@type).should == 'Binary'
    end

    it 'does nothing if parameter is not symbol' do
      subject.type = 'Binary'
      subject.instance_variable_get(:@type).should == 'Binary'
    end
  end

  describe '#type' do
    it 'returns type in human-readable format' do
      subject.type = 'Binary'
      subject.type.should == :binary
    end
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
groupdocs-2.2.0 spec/groupdocs/datasource/field_spec.rb
groupdocs-2.1.0 spec/groupdocs/datasource/field_spec.rb
groupdocs-2.0.0 spec/groupdocs/datasource/field_spec.rb
groupdocs-1.9.0 spec/groupdocs/datasource/field_spec.rb
groupdocs-1.8.1 spec/groupdocs/datasource/field_spec.rb
groupdocs-1.8.0 spec/groupdocs/datasource/field_spec.rb
groupdocs-1.7.0 spec/groupdocs/datasource/field_spec.rb
groupdocs-1.6.0 spec/groupdocs/datasource/field_spec.rb
groupdocs-1.5.9 spec/groupdocs/datasource/field_spec.rb
groupdocs-1.5.8 spec/groupdocs/datasource/field_spec.rb
groupdocs-1.5.7 spec/groupdocs/datasource/field_spec.rb
groupdocs-1.5.6 spec/groupdocs/datasource/field_spec.rb
groupdocs-1.5.5 spec/groupdocs/datasource/field_spec.rb
groupdocs-1.5.4 spec/groupdocs/datasource/field_spec.rb
groupdocs-1.5.3 spec/groupdocs/datasource/field_spec.rb
groupdocs-1.5.2 spec/groupdocs/datasource/field_spec.rb
groupdocs-1.5.1 spec/groupdocs/datasource/field_spec.rb
groupdocs-1.5.0 spec/groupdocs/datasource/field_spec.rb
groupdocs-1.4.2 spec/groupdocs/datasource/field_spec.rb
groupdocs-1.4.1 spec/groupdocs/datasource/field_spec.rb