Sha256: 51d941187fff991e0aef95ce74c23cce30e101d5b02958bec5881f9ce8277d35

Contents?: true

Size: 909 Bytes

Versions: 4

Compression:

Stored size: 909 Bytes

Contents

require 'spec_helper'
require 'minimart/web/html_generator'

describe Minimart::Web::HtmlGenerator do
  let(:cookbooks) do
    Minimart::Web::Cookbooks.new(inventory_directory: 'spec/fixtures')
  end

  let(:web_directory) { test_directory }

  subject do
    Minimart::Web::HtmlGenerator.new(
      web_directory: web_directory,
      cookbooks:     cookbooks)
  end

  describe '#generate' do
    it 'should copy any available assets' do
      subject.generate
      expect(Dir.exists?(File.join(web_directory, 'assets'))).to eq true
    end

    it 'should generate the dashboard page' do
      expect_any_instance_of(Minimart::Web::DashboardGenerator).to receive(:generate)
      subject.generate
    end

    it 'should generate show pages for any of the cookbooks' do
      expect_any_instance_of(Minimart::Web::CookbookShowPageGenerator).to receive(:generate)
      subject.generate
    end
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
minimart-1.1.3 spec/lib/minimart/web/html_generator_spec.rb
minimart-1.0.2 spec/lib/minimart/web/html_generator_spec.rb
minimart-1.0.1 spec/lib/minimart/web/html_generator_spec.rb
minimart-0.0.1 spec/lib/minimart/web/html_generator_spec.rb