Sha256: dd81e1934162f27ff372a83d253afd4486ed1cba46e9625631a69e3dcc1259d1

Contents?: true

Size: 1.3 KB

Versions: 4

Compression:

Stored size: 1.3 KB

Contents

# encoding: utf-8

require 'spec_helper'

describe ClassyAssets::Config do
  before do
    @asset_root = File.expand_path('../../support', __FILE__)
    @asset_host = 'http://example.com'
    @asset_prefix = 'assets'
    
    @asset_paths = Dir.glob(File.join(@asset_root, @asset_prefix, '*'))
    @vendor_path = File.expand_path('../../support/vendor', __FILE__)
    @asset_paths << @vendor_path

    ClassyAssets.config do |config|
      config.asset_root = @asset_root # must be configured first
      config.asset_debug = true
      config.asset_digest = true
      config.asset_host = @asset_host
      config.asset_paths << @vendor_path
    end

    @configuration = ClassyAssets.config
  end

  it "returns the configured asset_debug" do
    @configuration.asset_debug.must_equal true
  end

  it "returns the configured asset_digest" do
    @configuration.asset_digest.must_equal true
  end

  it "returns the configured asset_host" do
    @configuration.asset_host.must_equal @asset_host
  end

  it "returns the configured asset_prefix" do
    @configuration.asset_prefix.must_equal @asset_prefix
  end

  it "returns the configured asset_root" do
    @configuration.asset_root.must_equal @asset_root
  end

  it "returns the configured asset_paths" do
    @configuration.asset_paths.must_equal @asset_paths
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
classy_assets-0.6.3 spec/classy_assets/config_spec.rb
classy_assets-0.6.2 spec/classy_assets/config_spec.rb
classy_assets-0.6.1 spec/classy_assets/config_spec.rb
classy_assets-0.6.0 spec/classy_assets/config_spec.rb