Sha256: c0e7116382cd668a7e053c277cdf7cbbcd000e970ff45b861740be62205c232b
Contents?: true
Size: 1.09 KB
Versions: 68
Compression:
Stored size: 1.09 KB
Contents
require File.dirname(__FILE__) + '/spec_helper' describe YARD::Server::Adapter do after(:all) { Server::Adapter.shutdown } describe '#add_library' do it "should add a library" do lib = LibraryVersion.new('yard') a = Adapter.new({}) a.libraries.should be_empty a.add_library(lib) a.libraries['yard'].should == [lib] end end describe '#start' do it "should not implement #start" do lambda { Adapter.new({}).start }.should raise_error(NotImplementedError) end end describe '.setup' do it 'should add template paths and helpers' do Adapter.setup Templates::Template.extra_includes.should include(DocServerHelper) Templates::Engine.template_paths.should include(YARD::ROOT + '/yard/server/templates') end end describe '.shutdown' do it 'should cleanup template paths and helpers' do Adapter.setup Adapter.shutdown Templates::Template.extra_includes.should_not include(DocServerHelper) Templates::Engine.template_paths.should_not include(YARD::ROOT + '/yard/server/templates') end end end
Version data entries
68 entries across 52 versions & 7 rubygems