Sha256: c0b52183898c9304e2d15c5fec61fb179d898f95908dd64a4c13fddf6c82a197

Contents?: true

Size: 1 KB

Versions: 30

Compression:

Stored size: 1 KB

Contents

require File.dirname(__FILE__) + '/../spec_helper'
require 'ostruct'

describe YARD::Server::Commands::LibraryCommand do
  before do
    Templates::Engine.stub!(:render)
    Templates::Engine.stub!(:generate)
    YARD.stub!(:parse)
    Registry.stub!(:load)
    Registry.stub!(:save)

    @cmd = LibraryCommand.new(:adapter => mock_adapter)
    @request = OpenStruct.new(:xhr? => false, :path => "/foo")
    @library = OpenStruct.new(:source_path => '.')
    @cmd.library = @library
    @cmd.stub!(:load_yardoc).and_return(nil)
  end
  
  def call
    lambda { @cmd.call(@request) }.should raise_error(NotImplementedError)
  end
  
  describe "#call" do
    it "should raise NotImplementedError" do
      call
    end
    
    it "should set :rdoc as the default markup in incremental mode" do
      @cmd.incremental = true
      call
      @cmd.options[:markup].should == :rdoc
    end

    it "should set :rdoc as the default markup in regular mode" do
      call
      @cmd.options[:markup].should == :rdoc
    end
  end
end

Version data entries

30 entries across 30 versions & 4 rubygems

Version Path
challah-0.6.2 vendor/bundle/gems/yard-0.7.5/spec/server/commands/library_command_spec.rb
challah-0.6.1 vendor/bundle/gems/yard-0.7.5/spec/server/commands/library_command_spec.rb
challah-0.6.0 vendor/bundle/gems/yard-0.7.5/spec/server/commands/library_command_spec.rb
challah-0.5.4 vendor/bundle/gems/yard-0.7.5/spec/server/commands/library_command_spec.rb
challah-0.5.3 vendor/bundle/gems/yard-0.7.5/spec/server/commands/library_command_spec.rb
challah-0.5.2 vendor/bundle/gems/yard-0.7.5/spec/server/commands/library_command_spec.rb
challah-0.5.1 vendor/bundle/gems/yard-0.7.5/spec/server/commands/library_command_spec.rb
challah-0.5.0 vendor/bundle/gems/yard-0.7.5/spec/server/commands/library_command_spec.rb
challah-0.4.1 vendor/bundle/gems/yard-0.7.5/spec/server/commands/library_command_spec.rb
challah-0.4.0 vendor/bundle/gems/yard-0.7.5/spec/server/commands/library_command_spec.rb
challah-0.3.5 vendor/bundle/gems/yard-0.7.5/spec/server/commands/library_command_spec.rb
challah-0.3.4 vendor/bundle/gems/yard-0.7.5/spec/server/commands/library_command_spec.rb
challah-0.3.3 vendor/bundle/gems/yard-0.7.5/spec/server/commands/library_command_spec.rb
challah-0.3.2 vendor/bundle/gems/yard-0.7.5/spec/server/commands/library_command_spec.rb
challah-0.3.1 vendor/bundle/gems/yard-0.7.5/spec/server/commands/library_command_spec.rb
challah-0.3.0 vendor/bundle/gems/yard-0.7.5/spec/server/commands/library_command_spec.rb
challah-0.2.1 vendor/bundle/gems/yard-0.7.5/spec/server/commands/library_command_spec.rb
challah-0.2.0 vendor/bundle/gems/yard-0.7.5/spec/server/commands/library_command_spec.rb
yard-0.7.5 spec/server/commands/library_command_spec.rb
nutshell-crm-0.0.6.alpha vendor/bundle/gems/yard-0.7.4/spec/server/commands/library_command_spec.rb