Sha256: a5cace85b2785d26c8e07e665be77d160d9343d8cf2fe1a2249f7848edf7f7f2
Contents?: true
Size: 1.43 KB
Versions: 1
Compression:
Stored size: 1.43 KB
Contents
require 'test_helper' module Vedeu module Coercers describe HorizontalAlignment do let(:described) { Vedeu::Coercers::HorizontalAlignment } let(:instance) { described.new(_value) } let(:_value) {} describe '#value' do subject { described.coerce(_value).value } context 'when the value is :none' do let(:_value) { :none } it { subject.must_equal(:none) } end context 'when the value is nil' do it { subject.must_equal(:none) } end context 'when the value is not a Symbol' do let(:_value) { 'invalid' } it { subject.must_equal(:none) } end context 'when the value is :center' do let(:_value) { :center } it { subject.must_equal(:centre) } end context 'when the value is :centre' do let(:_value) { :centre } it { subject.must_equal(:centre) } end context 'when the value is :left' do let(:_value) { :left } it { subject.must_equal(:left) } end context 'when the value is :right' do let(:_value) { :right } it { subject.must_equal(:right) } end context 'when the value is :align_invalid' do let(:_value) { :align_invalid } it { subject.must_equal(:none) } end end end # HorizontalAlignment end # Coercers end # Vedeu
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
vedeu-0.8.0 | test/lib/vedeu/coercers/horizontal_alignment_test.rb |