Sha256: 1fcea5cf62255eb9ab876f41b1954717ea8305c4f9770f4285db482891d29029

Contents?: true

Size: 707 Bytes

Versions: 18

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

18 entries across 18 versions & 1 rubygems

Version Path
nanoc-4.7.5 spec/nanoc/regressions/gh_937_spec.rb
nanoc-4.7.4 spec/nanoc/regressions/gh_937_spec.rb
nanoc-4.7.3 spec/nanoc/regressions/gh_937_spec.rb
nanoc-4.7.2 spec/nanoc/regressions/gh_937_spec.rb
nanoc-4.7.1 spec/nanoc/regressions/gh_937_spec.rb
nanoc-4.7.0 spec/nanoc/regressions/gh_937_spec.rb
nanoc-4.6.4 spec/nanoc/regressions/gh_937_spec.rb
nanoc-4.6.3 spec/nanoc/regressions/gh_937_spec.rb
nanoc-4.6.2 spec/nanoc/regressions/gh_937_spec.rb
nanoc-4.6.1 spec/nanoc/regressions/gh_937_spec.rb
nanoc-4.6.0 spec/nanoc/regressions/gh_937_spec.rb
nanoc-4.5.4 spec/nanoc/regressions/gh_937_spec.rb
nanoc-4.5.3 spec/nanoc/regressions/gh_937_spec.rb
nanoc-4.5.2 spec/nanoc/regressions/gh_937_spec.rb
nanoc-4.5.1 spec/nanoc/regressions/gh_937_spec.rb
nanoc-4.5.0 spec/nanoc/regressions/gh_937_spec.rb
nanoc-4.4.7 spec/nanoc/regressions/gh_937_spec.rb
nanoc-4.4.6 spec/nanoc/regressions/gh_937_spec.rb