Sha256: c941e29e13201906e98c617e4d309eeb309c988ab229009df82053505363ae6d
Contents?: true
Size: 701 Bytes
Versions: 1
Compression:
Stored size: 701 Bytes
Contents
require 'spec_helper' describe DocTag do SchemaTools.schema_path = DocTag::Schema.path before :all do @schemata = SchemaTools::Reader.read_all end context 'class creation' do it 'should init all classes' do DocTag.init @schemata.each do |schema| klass = schema['name'].classify DocTag.const_defined?(klass).should be_true DocTag.const_get(klass).new end end it 'should with params' do DocTag.init DocTag::Document.new number: '4711' end it 'should validate' do DocTag.init doc = DocTag::Document.new number: '4711' doc.valid? doc.errors.full_messages.should be_present end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
doctag-0.0.3 | spec/doctag_spec.rb |