Sha256: 737bcf49b48dd5486d2daffa5303ad816ffe2e6b3f1ad576f2486009ce25b86c

Contents?: true

Size: 841 Bytes

Versions: 68

Compression:

Stored size: 841 Bytes

Contents

require 'spec_helper'

class Convection::Model::Template
  describe '#validate_description' do
    context 'with a regular Description bytesize' do
      subject do
        Convection.template do
          description '0' * CF_MAX_DESCRIPTION_BYTESIZE
        end
      end

      it 'does not raise an excessive description error' do
        rendered = subject.render
        expect { subject.validate(rendered) }.to_not raise_error
      end
    end

    context 'with excessive Description bytesize' do
      subject do
        Convection.template do
          description '0' * (CF_MAX_DESCRIPTION_BYTESIZE + 1)
        end
      end

      it 'raises an excessive description error' do
        rendered = subject.render
        expect { subject.validate(rendered) }.to raise_error(ExcessiveDescriptionError)
      end
    end
  end
end

Version data entries

68 entries across 68 versions & 1 rubygems

Version Path
convection-1.1.3 spec/convection/model/template/validate_description_spec.rb
convection-1.1.2 spec/convection/model/template/validate_description_spec.rb
convection-1.1.1 spec/convection/model/template/validate_description_spec.rb
convection-1.1.0 spec/convection/model/template/validate_description_spec.rb
convection-1.0.7 spec/convection/model/template/validate_description_spec.rb
convection-1.0.6 spec/convection/model/template/validate_description_spec.rb
convection-1.0.5 spec/convection/model/template/validate_description_spec.rb
convection-1.0.4 spec/convection/model/template/validate_description_spec.rb
convection-1.0.3 spec/convection/model/template/validate_description_spec.rb
convection-1.0.2 spec/convection/model/template/validate_description_spec.rb
convection-1.0.1 spec/convection/model/template/validate_description_spec.rb
convection-1.0.0.pre.beta.10 spec/convection/model/template/validate_description_spec.rb
convection-1.0.0.pre.beta.9 spec/convection/model/template/validate_description_spec.rb
convection-1.0.0.pre.beta.8 spec/convection/model/template/validate_description_spec.rb
convection-1.0.0.pre.beta.7 spec/convection/model/template/validate_description_spec.rb
convection-1.0.0.pre.beta.6 spec/convection/model/template/validate_description_spec.rb
convection-1.0.0.pre.beta.4 spec/convection/model/template/validate_description_spec.rb
convection-1.0.0.pre.beta.1 spec/convection/model/template/validate_description_spec.rb
convection-0.4.3 spec/convection/model/template/validate_description_spec.rb
convection-0.4.2 spec/convection/model/template/validate_description_spec.rb