Sha256: de28641fbe87b9ca31573e301ee1def6ae929d04f90c1b7c31977342d1e62280

Contents?: true

Size: 1.92 KB

Versions: 6

Compression:

Stored size: 1.92 KB

Contents

require File.join(File.dirname(__FILE__), 'support', 'spec_helper')
require 'albacore/docu'
require 'docu_patch'

describe Docu, "when building docs without any assemblies specified" do  
  before :all do
    @docu = Docu.new
    @docu.execute
  end

  it "should fail with a missing assemblies message" do
    @docu.failed.should be_true
    @docu.failure_message.should eql('Docu Failed. No assemblies specified')
  end
end

describe Docu, "when building docs fails" do  
  before :all do
    @docu = Docu.new
    @docu.command_result = false
    @docu.assemblies 'test.dll'
    @docu.execute
  end

  it "should fail with a generic message" do
    @docu.failed.should be_true
    @docu.failure_message.should eql('Docu Failed. See Build Log For Detail')
  end
end

describe Docu, "when building docs with assemblies specified" do
  before :all do
    @docu = Docu.new
    @docu.command_result = true
    @docu.assemblies 'test.dll'
    @docu.execute
  end
  
  it "should pass the assemblies in the command-line arguments" do
    @docu.command_parameters.should include('test.dll')
  end
end

describe Docu, "when building docs with assemblies and xml files specified" do
  before :all do
    @docu = Docu.new
    @docu.command_result = true
    @docu.xml_files 'test.xml'
    @docu.assemblies 'test.dll'
    @docu.execute
  end
  
  it "should pass the xml files in the command-line arguments after the assemblies" do
    @docu.command_parameters.should include('test.dll test.xml')
  end
end

describe Docu, "when building docs with an output location specified" do
  before :all do
    @docu = Docu.new
    @docu.command_result = true
    @docu.assemblies 'test.dll'
    @docu.output_location = 'output_location'
    @docu.execute
  end
  
  it "should pass the output location using the --output switch" do
    @docu.command_parameters.should include('--output="output_location"')
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
albacore-0.1.5 spec/docu_spec.rb
albacore-0.1.4 spec/docu_spec.rb
albacore-0.1.3 spec/docu_spec.rb
albacore-0.1.2 spec/docu_spec.rb
albacore-0.1.1 spec/docu_spec.rb
albacore-0.1.0 spec/docu_spec.rb