Sha256: 74eaa798c8dda401a22a5618b343c6516387733e0254b841e8dd52784f6e8079

Contents?: true

Size: 657 Bytes

Versions: 2

Compression:

Stored size: 657 Bytes

Contents

# frozen_string_literal: true
require 'spec_helper'

RSpec.describe 'SCSS filter rendering', type: :render do
  it 'renders SCSS filter' do
    html = render_string(<<'HAML')
:scss
  nav {
    ul {
      margin: 0;
      content: "hello";
    }
  }
HAML
    expect(html).to include('<style>')
    expect(html).to include('nav ul {')
    expect(html).to include('content: "hello"')
  end

  it 'parses string interpolation' do
    html = render_string(<<'HAML')
:scss
  nav {
    ul {
      margin: #{0 + 5}px;
    }
  }
HAML
    expect(html).to include('<style>')
    expect(html).to include('nav ul {')
    expect(html).to include('margin: 5px')
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
faml-0.8.1 spec/render/filters/scss_spec.rb
faml-0.8.0 spec/render/filters/scss_spec.rb