Sha256: 2390c6e4bf147ab6f1c73c8dfd9decaa465e18d99528e60539429d73443d6b86

Contents?: true

Size: 477 Bytes

Versions: 9

Compression:

Stored size: 477 Bytes

Contents

# frozen-string-literal: true
require 'spec_helper'

RSpec.describe 'Haml comment rendering', type: :render do
  it 'renders nothing' do
    expect(render_string(<<HAML)).to eq("<div>\n<p>hello</p>\n<p>world</p>\n</div>\n")
%div
  %p hello
  -# this
      should
    not
      be rendered
  %p world
HAML
  end

  it 'parses empty comment' do
    expect(render_string(<<HAML)).to eq("<div>\n<p>hello</p>\n<p>world</p>\n</div>\n")
%div
  %p hello
  -#
  %p world
HAML
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
faml-0.7.3 spec/render/haml_comment_spec.rb
faml-0.7.2 spec/render/haml_comment_spec.rb
faml-0.7.1 spec/render/haml_comment_spec.rb
faml-0.7.0 spec/render/haml_comment_spec.rb
faml-0.6.5 spec/render/haml_comment_spec.rb
faml-0.6.4 spec/render/haml_comment_spec.rb
faml-0.6.3 spec/render/haml_comment_spec.rb
faml-0.6.2 spec/render/haml_comment_spec.rb
faml-0.6.1 spec/render/haml_comment_spec.rb