Sha256: be34dd0da02c7d37f84739598d0276e9f1a1c966c910ffd3fbeb3af8bf2b2a15

Contents?: true

Size: 566 Bytes

Versions: 1

Compression:

Stored size: 566 Bytes

Contents

require 'spec_helper'

describe Petroglyph::Engine do
  it "takes a template" do
    engine = Petroglyph::Engine.new('node :whatever => "nevermind"')
    engine.render.should eq({:whatever => "nevermind"}.to_json)
  end

  it "takes a block" do
    Petroglyph::Engine.new.render do
      node :whatever => "nevermind"
    end.should eq({:whatever => "nevermind"}.to_json)
  end

  it "passes the locals" do
    engine = Petroglyph::Engine.new('node :whatever => thing')
    engine.render(nil, {:thing => 'stuff'}).should eq({:whatever => 'stuff'}.to_json)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
petroglyph-0.0.1 spec/engine_spec.rb