Sha256: 719912ce03af00c1bcf8f3c9053bbcc401c072d0c6aab7042c856228670a44b1
Contents?: true
Size: 1.09 KB
Versions: 39
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
39 entries across 39 versions & 4 rubygems