Sha256: a5278383ab7d1245adb6d3c9db45dcb8ea8405564435fb9b0113f21a35a2841a

Contents?: true

Size: 813 Bytes

Versions: 5

Compression:

Stored size: 813 Bytes

Contents

require 'test_helper'

module AmpleAssets
  class ConfigurationTest < ActiveSupport::TestCase
  
    context 'The Configuration' do
    
      context 'defaults' do
      
        AmpleAssets::Configuration::VALID_OPTIONS_KEYS.each do |key|
          should "be returned for #{key}" do
            AmpleAssets.send(key) == eval("AmpleAssets::Configuration::DEFAULT_#{key.upcase}")
          end
        
        end
      
      end
    
      context 'via a configure block' do
      
        AmpleAssets::Configuration::VALID_OPTIONS_KEYS.each do |key|
          should "set the #{key}" do
            AmpleAssets.configure do |config|
              config.send("#{key}=", key)
              assert AmpleAssets.send(key) == key
            end
          end
        end
     
      end
    
    end
  
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ample_assets-0.0.6 test/unit/ample_assets/configuration_test.rb
ample_assets-0.0.4 test/unit/ample_assets/configuration_test.rb
ample_assets-0.0.3 test/unit/ample_assets/configuration_test.rb
ample_assets-0.0.2 test/unit/ample_assets/configuration_test.rb
ample_assets-0.0.1 test/unit/ample_assets/configuration_test.rb