Sha256: da6158171e9d4edd864025f22a0b493692760d07a9a5bc5705c2efeb73e1c8c6
Contents?: true
Size: 1.88 KB
Versions: 17
Compression:
Stored size: 1.88 KB
Contents
require 'test_helper' module Vedeu module Geometries class ValidatorTestClass include Vedeu::Geometries::Validator end describe Validator do let(:included) { Vedeu::Geometries::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 # Geometries end # Vedeu
Version data entries
17 entries across 17 versions & 1 rubygems