Sha256: 2275e0e754f11d746431d228ba476dd8ed62e0e711301af34830ccf897f8821e

Contents?: true

Size: 657 Bytes

Versions: 9

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

9 entries across 9 versions & 1 rubygems

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