Sha256: 9319043c81182c31b2c4bba1dacefd04996860689956e7a990ec0be861a3dc94

Contents?: true

Size: 629 Bytes

Versions: 10

Compression:

Stored size: 629 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( File.dirname(__FILE__) + "/test-data/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

10 entries across 10 versions & 1 rubygems

Version Path
awestruct-0.5.4.rc3 spec/yaml_handler_spec.rb
awestruct-0.5.4.rc2 spec/yaml_handler_spec.rb
awestruct-0.5.4.rc spec/yaml_handler_spec.rb
awestruct-0.5.4.beta1 spec/yaml_handler_spec.rb
awestruct-0.5.3 spec/yaml_handler_spec.rb
awestruct-0.5.2.1 spec/yaml_handler_spec.rb
awestruct-0.5.2 spec/yaml_handler_spec.rb
awestruct-0.5.1 spec/yaml_handler_spec.rb
awestruct-0.5.1a spec/yaml_handler_spec.rb
awestruct-0.5.0 spec/yaml_handler_spec.rb