Sha256: 4be1ccfe677b2acc6a4768c295e92e41b42e1d440804af8c2d1e53624286b232

Contents?: true

Size: 607 Bytes

Versions: 29

Compression:

Stored size: 607 Bytes

Contents

require 'hashery'
require 'awestruct/handlers/file_handler'
require 'awestruct/handlers/yaml_handler'

describe Awestruct::Handlers::YamlHandler do

  before :all do
    @site = Hashery::OpenCascade[ { :encoding=>false } ]
  end

  it "should provide access to the yaml as front-matter" do 
    filename = Pathname.new( test_data_dir 'simple-data.yaml' )
    file_handler = Awestruct::Handlers::FileHandler.new( @site, filename )
    handler = Awestruct::Handlers::YamlHandler.new( @site, file_handler )
    handler.raw_content.should be_nil
    handler.front_matter['taco'].should == 'deluxe'
  end

end

Version data entries

29 entries across 29 versions & 1 rubygems

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