Sha256: 48974f776c0c599ca36f9f01ff6f17e3e2a6ccb7e28d5f7cabed02434fb5beb5

Contents?: true

Size: 749 Bytes

Versions: 12

Compression:

Stored size: 749 Bytes

Contents

require "#{File.dirname(__FILE__)}/../spec_helper"

describe Bonsai::Template do
  it "should have a path" do
    Bonsai::Template.path.should_not be_nil
  end
  
  it "should respond to find" do
    Bonsai::Template.should respond_to(:find)
    Bonsai::Template.find("demo-template").should be_an_instance_of(Bonsai::Template)
  end
  
  describe "instance" do
    it "should give the template source" do
      @template = Bonsai::Template.find("demo-template")
      File.read(@template.path).should == "Hello from our template, named {{name}}\n\n{{page_title}}\n\n{{#images}}\n  {{path}}\n{{/images}}\n\n{{#children}}\n  {{permalink}}\n{{/children}}\n\n{{#magic}}\n  {{path}}\n{{/magic}}\n\n{{>partials/inserted}}\n\n{{{body}}}"
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
bonsai-1.3.2 spec/bonsai/template_spec.rb
bonsai-1.3.0 spec/bonsai/template_spec.rb
bonsai-1.2.0 spec/bonsai/template_spec.rb
bonsai-1.1.6 spec/bonsai/template_spec.rb
bonsai-1.1.5 spec/bonsai/template_spec.rb
bonsai-1.1.4 spec/bonsai/template_spec.rb
bonsai-1.1.3 spec/bonsai/template_spec.rb
bonsai-1.1.2 spec/bonsai/template_spec.rb
bonsai-1.1.1 spec/bonsai/template_spec.rb
bonsai-1.1.0 spec/bonsai/template_spec.rb
bonsai-1.0.1 spec/bonsai/template_spec.rb
bonsai-1.0.0 spec/bonsai/template_spec.rb