Sha256: bebee6d7589106207c6f1d9ea4501ecf0c0e11c262d667dbfbfa0cd3e7d786c2
Contents?: true
Size: 1.64 KB
Versions: 1
Compression:
Stored size: 1.64 KB
Contents
# # File 'model_spec.rb' created on 10 mar 2008 at 13:36:29. # See 'dokkit.rb' or +LICENSE+ for licence information. # # (c)2008 Andrea Fazzi <andrea.fazzi@alca.le.it> (and contributors). # # To execute this spec run: # # spec spec/model_spec.rb # $LOAD_PATH.unshift(File.expand_path(File.join(File.dirname(__FILE__),'../lib'))) require 'rubygems' require 'spec' require 'dokkit' require 'dokkit/model' require File.dirname(__FILE__) + '/spec_helper.rb' describe Dokkit::Model, ' when initialized' do include SpecPathHelper before(:all) do @initial_dir = Dir.pwd Dir.chdir(File.join(File.dirname(__FILE__), SpecPathHelper::DATA_TEST_DIR)) end before do @model = Dokkit::Model.init do |model| model.config.cache_dir = cache_path end end after(:all) do Dir.chdir(@initial_dir) end it 'should be instantiated only once' do Dokkit::Model.init.object_id.should == @model.object_id end it 'should be initialized with a name' do Dokkit::Model.init('simpledocument').name == 'simpledocument' end it 'should instantiate a TaskConfig object' do @model.config.class.should == Dokkit::TaskConfig end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
dokkit-0.3.0 | spec/model_spec.rb |