Sha256: 0acb80e1dd47cc6c059c14509734306e6bd92bf2ef3f280be0c89babea2bd564

Contents?: true

Size: 670 Bytes

Versions: 1

Compression:

Stored size: 670 Bytes

Contents

require "test_helper"

# most tests are via cells-erb.

class ErbseTest < MiniTest::Spec
  it do
    Erbse::Template.new(%{<%- text = "Hello" %> <%= text %>}).call.must_equal "@output_buffer = output_buffer; text = \"Hello\" ;@output_buffer.safe_append=' '.freeze;@output_buffer.append=( text );@output_buffer.to_s"
  end

  # nested <%= block do %> syntax.
  it do
    Erbse::Template.new(%{<%= form_for do %><%= content_tag :div do %>DIV<% end %><% end %>}).call.must_equal "@output_buffer = output_buffer;@output_buffer.append=  form_for do @output_buffer.append=  content_tag :div do @output_buffer.safe_append='DIV'.freeze; end ; end ;@output_buffer.to_s"
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
erbse-0.0.2 test/erbse_test.rb