Sha256: 9d17a3b6af4a9486b8ebda6ae328a82c6cb58225de7012c5dcdd64f155224b8c

Contents?: true

Size: 521 Bytes

Versions: 5

Compression:

Stored size: 521 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

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

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

    it { should == 0 }
  end

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

    it { should == min_length }
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

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