Sha256: f92a7b155ccdbf7800c3a0b6c6332c65b946646852f2f7169a93742dbaaccde4
Contents?: true
Size: 1.87 KB
Versions: 15
Compression:
Stored size: 1.87 KB
Contents
require 'test_helper' module Vedeu module Geometry class ValidatorTestClass include Vedeu::Geometry::Validator end describe Validator do let(:included) { Vedeu::Geometry::ValidatorTestClass.new } describe '#validate_height!' do let(:_value) {} subject { included.validate_height!(_value) } context 'when the value is given' do let(:_value) { 11 } it { subject.must_equal(true) } end context 'when the value is not given' do it { proc { subject }.must_raise(Vedeu::Error::InvalidSyntax) } end end describe '#validate_horizontal_alignment!' do let(:_value) {} subject { included.validate_horizontal_alignment!(_value) } context 'when the value is given' do let(:_value) { :left } it { subject.must_equal(true) } end context 'when the value is not given' do it { proc { subject }.must_raise(Vedeu::Error::InvalidSyntax) } end end describe '#validate_vertical_alignment!' do let(:_value) {} subject { included.validate_vertical_alignment!(_value) } context 'when the value is given' do let(:_value) { :top } it { subject.must_equal(true) } end context 'when the value is not given' do it { proc { subject }.must_raise(Vedeu::Error::InvalidSyntax) } end end describe '#validate_width!' do let(:_value) {} subject { included.validate_width!(_value) } context 'when the value is given' do let(:_value) { 11 } it { subject.must_equal(true) } end context 'when the value is not given' do it { proc { subject }.must_raise(Vedeu::Error::InvalidSyntax) } end end end # Validator end # Geometry end # Vedeu
Version data entries
15 entries across 15 versions & 1 rubygems