File: compass_spec.rb

package info (click to toggle)
ruby-autoprefixer-rails 8.6.5%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 324 kB
  • sloc: ruby: 637; sh: 14; makefile: 14
file content (21 lines) | stat: -rw-r--r-- 724 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
require_relative 'spec_helper'

COMPASS_DIR     = Pathname(__FILE__).dirname.join('compass')
STYLESHEETS_DIR = COMPASS_DIR.join('stylesheets')

describe 'Compass integration' do
  after do
    STYLESHEETS_DIR.rmtree if STYLESHEETS_DIR.exist?
  end

  it 'works from config.rb' do
    `cd #{ COMPASS_DIR }; bundle exec compass compile`
    expect(STYLESHEETS_DIR.join('screen.css').read)
      .to eq("a{display:-webkit-flex;display:flex}\n\n" +
             "/*# sourceMappingURL=screen.css.map */")
    expect(STYLESHEETS_DIR.join('screen.css.map').read)
      .to eq('{"version":3,"sources":["../sass/screen.scss"],"names":[],' +
             '"mappings":"AAAA,EACI,qBAAa,AAAb,YAAa,CAAA","file":"screen.css"}')
  end

end