# 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