Sha256: 8aa0921423f7be0ea378c99543a1aac4d73a6e48441953083f2eb27d7c84ff5d

Contents?: true

Size: 763 Bytes

Versions: 18

Compression:

Stored size: 763 Bytes

Contents

# frozen_string_literal: true

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.8.12 spec/nanoc/regressions/gh_937_spec.rb
nanoc-4.8.11 spec/nanoc/regressions/gh_937_spec.rb
nanoc-4.8.10 spec/nanoc/regressions/gh_937_spec.rb
nanoc-4.8.9 spec/nanoc/regressions/gh_937_spec.rb
nanoc-4.8.8 spec/nanoc/regressions/gh_937_spec.rb
nanoc-4.8.7 spec/nanoc/regressions/gh_937_spec.rb
nanoc-4.8.6 spec/nanoc/regressions/gh_937_spec.rb
nanoc-4.8.5 spec/nanoc/regressions/gh_937_spec.rb
nanoc-4.8.4 spec/nanoc/regressions/gh_937_spec.rb
nanoc-4.8.3 spec/nanoc/regressions/gh_937_spec.rb
nanoc-4.8.2 spec/nanoc/regressions/gh_937_spec.rb
nanoc-4.8.1 spec/nanoc/regressions/gh_937_spec.rb
nanoc-4.8.0 spec/nanoc/regressions/gh_937_spec.rb
nanoc-4.7.14 spec/nanoc/regressions/gh_937_spec.rb
nanoc-4.7.13 spec/nanoc/regressions/gh_937_spec.rb
nanoc-4.7.12 spec/nanoc/regressions/gh_937_spec.rb
nanoc-4.7.11 spec/nanoc/regressions/gh_937_spec.rb
nanoc-4.7.10 spec/nanoc/regressions/gh_937_spec.rb