Sha256: 2c7ad9ccc005046c04153839c61764244f99000086dffa30f8e8f8800a8dd023

Contents?: true

Size: 1.13 KB

Versions: 17

Compression:

Stored size: 1.13 KB

Contents

require 'awestruct/engine'
require 'awestruct/pipeline' 

describe Awestruct::Pipeline do
  before do 
    dir = Pathname.new( test_data_dir 'pipeline' )
    opts = Awestruct::CLI::Options.new
    opts.source_dir = dir

    @site = Hashery::OpenCascade[ { :encoding=>false, :dir=>dir, :config=>Awestruct::Config.new( opts ), :pages => [] } ]
    @engine = Awestruct::Engine.new(@site.config)

    log = StringIO.new
    $LOG = Logger.new(log)
    $LOG.level = Logger::DEBUG 

    @engine.load_pipeline
    @pipeline = @engine.pipeline
  end

  context "after pipeline is loaded" do 
    specify "should have all specified extension points" do
      expect(@pipeline.before_all_extensions.size).to eql 1
      expect(@pipeline.extensions.size).to eql 1
      expect(@pipeline.after_all_extensions.size).to eql 1
      expect(@pipeline.helpers.size).to eql 1
      expect(@pipeline.transformers.size).to eql 1
      expect(@pipeline.after_generation_extensions.size).to eql 1
    end
  end

  it "should provide a way to find a matching handler chain for a given path" do
    pipeline = Awestruct::Pipeline.new
    pipeline.handler_chains[ "foot" ]
  end

end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
awestruct-0.6.7 spec/awestruct/pipeline_spec.rb
awestruct-0.6.6 spec/awestruct/pipeline_spec.rb
awestruct-0.6.5 spec/awestruct/pipeline_spec.rb
awestruct-0.6.4 spec/awestruct/pipeline_spec.rb
awestruct-0.6.3 spec/awestruct/pipeline_spec.rb
awestruct-0.6.2 spec/awestruct/pipeline_spec.rb
awestruct-0.6.1 spec/awestruct/pipeline_spec.rb
awestruct-0.6.0 spec/awestruct/pipeline_spec.rb
awestruct-0.6.0.RC1 spec/awestruct/pipeline_spec.rb
awestruct-0.6.0.alpha4 spec/awestruct/pipeline_spec.rb
awestruct-0.6.0.alpha3 spec/awestruct/pipeline_spec.rb
awestruct-0.6.0.alpha1 spec/awestruct/pipeline_spec.rb
awestruct-0.5.7 spec/awestruct/pipeline_spec.rb
awestruct-0.5.7.RC2 spec/awestruct/pipeline_spec.rb
awestruct-0.5.7.RC1 spec/awestruct/pipeline_spec.rb
awestruct-0.5.6 spec/awestruct/pipeline_spec.rb
awestruct-0.5.6.beta9 spec/awestruct/pipeline_spec.rb