Sha256: 8771c7cb9f6d25d05bada97fbec2d52f0eb13dc6471cfd13f5795b75aa7f62f5

Contents?: true

Size: 509 Bytes

Versions: 1

Compression:

Stored size: 509 Bytes

Contents

require "spec_helper"


describe Stormy::Engines::Erb do

  let(:app) { StormyApp.new({ root: FIXTURE_ROOT + "/dummy_site/" }) }
  let(:engine) { Stormy::Engines::Erb.new(app) }

  let(:body) do
    <<-DOC
The answer is <%= 1+2 %>.
The word is <%= meta[:title] %>
    DOC
  end

  context "#render" do
    it "renders erbs" do
      result = engine.render(body,{ meta: { title: "Yay!" }})
      expect(result).to include "The answer is 3"
      expect(result).to include "The word is Yay!"
    end
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
stormy-0.0.1 spec/stormy/engines/erb_spec.rb