Sha256: ff697d430066137ce00baf27a71fcb6217b80a78f10c3525068e1a0a1c5dcfe3

Contents?: true

Size: 513 Bytes

Versions: 37

Compression:

Stored size: 513 Bytes

Contents

require 'spec_helper'

RSpec.describe 'Preserve filter rendering', type: :render do
  it 'renders preserve filter' do
    expect(render_string(<<'HAML')).to eq("<span>start</span>\nhello&#x000A;  <p>wor&#x000A;ld</p>&#x000A;<span>hello</span>\n<span>end</span>\n")
%span start
:preserve
  hello
    #{"<p>wor\nld</p>"}
  <span>hello</span>
%span end
HAML
  end

  it 'preserves last empty lines' do
    expect(render_string(<<HAML)).to eq("hello&#x000A;&#x000A;\n<p></p>\n")
:preserve
  hello


%p
HAML
  end
end

Version data entries

37 entries across 37 versions & 2 rubygems

Version Path
faml-0.6.0 spec/render/filters/preserve_spec.rb
faml-0.5.1 spec/render/filters/preserve_spec.rb
faml-0.5.0 spec/render/filters/preserve_spec.rb
faml-0.4.2 spec/render/filters/preserve_spec.rb
faml-0.4.1 spec/render/filters/preserve_spec.rb
faml-0.4.0 spec/render/filters/preserve_spec.rb
faml-0.3.6 spec/render/filters/preserve_spec.rb
faml-0.3.5 spec/render/filters/preserve_spec.rb
faml-0.3.4 spec/render/filters/preserve_spec.rb
faml-0.3.3 spec/render/filters/preserve_spec.rb
faml-0.3.2 spec/render/filters/preserve_spec.rb
faml-0.3.1 spec/render/filters/preserve_spec.rb
faml-0.3.0 spec/render/filters/preserve_spec.rb
faml-0.2.16 spec/render/filters/preserve_spec.rb
faml-0.2.15 spec/render/filters/preserve_spec.rb
faml-0.2.14 spec/render/filters/preserve_spec.rb
faml-0.2.13 spec/render/filters/preserve_spec.rb
faml-0.2.12 spec/render/filters/preserve_spec.rb
faml-0.2.11 spec/render/filters/preserve_spec.rb
faml-0.2.10 spec/render/filters/preserve_spec.rb