Sha256: 2a102e6d19d27e74f06c91acd877f4084fdf35ed8fd36ec2fe9b0760393ecd1b

Contents?: true

Size: 707 Bytes

Versions: 4

Compression:

Stored size: 707 Bytes

Contents

describe 'GH-937', site: true, stdio: true do
  before do
    File.write('content/style.sass', ".test\n  color: red")

    File.write(
      'nanoc.yaml',
      "sass_style: compact\nenvironments:\n  staging:\n    sass_style: expanded",
    )

    File.write('Rules', <<EOS)
compile '/*.sass' do
  filter :sass, style: @config[:sass_style].to_sym
  write item.identifier.without_ext + '.css'
end
EOS
  end

  it 'does not use cache when switching environments' do
    Nanoc::CLI.run(%w[compile])
    expect(File.read('output/style.css')).to eq(".test { color: red; }\n")

    Nanoc::CLI.run(%w[compile --env=staging])
    expect(File.read('output/style.css')).to eq(".test {\n  color: red;\n}\n")
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
nanoc-4.7.9 spec/nanoc/regressions/gh_937_spec.rb
nanoc-4.7.8 spec/nanoc/regressions/gh_937_spec.rb
nanoc-4.7.7 spec/nanoc/regressions/gh_937_spec.rb
nanoc-4.7.6 spec/nanoc/regressions/gh_937_spec.rb