Sha256: a0518d7353343bcb5f77eb866806b0b6d442a321e4e25955eb95e1e2ebeab4be
Contents?: true
Size: 1004 Bytes
Versions: 1
Compression:
Stored size: 1004 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Attribute::String, '#joinable?' do subject { object.joinable?(other) } let(:object) { described_class.new(:string, :min_length => 10, :max_length => 20) } context 'when the attribute types and lengths are the same' do let(:other) { described_class.new(:string, :min_length => object.min_length, :max_length => object.max_length) } it { should be(true) } it 'is symmetric' do should == other.joinable?(object) end end context 'when the attribute types are the same and the lengths are different' do let(:other) { described_class.new(:string, :min_length => 1, :max_length => 20) } it { should be(false) } it 'is symmetric' do should == other.joinable?(object) end end context 'when the attribute types are different' do let(:other) { Attribute::Integer.new(:different) } it { should be(false) } it 'is symmetric' do should == other.joinable?(object) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
veritas-0.0.4 | spec/unit/veritas/attribute/string/joinable_spec.rb |