Sha256: 42855d44f32df8e8f07d7128a5d055d6b769e60abb5a5c408f1441f2e7cfe089

Contents?: true

Size: 522 Bytes

Versions: 5

Compression:

Stored size: 522 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Attribute::String, '#max_length' do
  subject { object.max_length }

  context 'without :max_length option passed to constructor' do
    let(:object) { described_class.new(:name) }

    it { should == 50 }
  end

  context 'with :length option passed to constructor' do
    let(:max_length) { 100                                                   }
    let(:object)     { described_class.new(:name, :max_length => max_length) }

    it { should == max_length }
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
axiom-0.1.0 spec/unit/axiom/attribute/string/max_length_spec.rb
veritas-0.0.7 spec/unit/veritas/attribute/string/max_length_spec.rb
veritas-0.0.6 spec/unit/veritas/attribute/string/max_length_spec.rb
veritas-0.0.5 spec/unit/veritas/attribute/string/max_length_spec.rb
veritas-0.0.4 spec/unit/veritas/attribute/string/max_length_spec.rb