Sha256: b7f828549efa3cf9b51894bd9bd3051e9feaf29cdd09b2bbdaabef9ed65aee0d

Contents?: true

Size: 699 Bytes

Versions: 9

Compression:

Stored size: 699 Bytes

Contents

class Test::Unit::TestCase
  def self.should_require_config_options(options)
    valid_options = {
      "access_key" => "45127185235",
      "secret_key" => "4321542523453454325j",
      "partner_id" => "SomebodySpecial",
      "uri"        => "https://agcws-gamma.amazon.com/",
      "discount_percentage" => 0.04
    }
    
    options = [options] unless options.is_a?(Array)

    options.each do |option|
      should "require #{option} as a configuration option" do
        assert_raise Agcod::Error::ConfigurationError do
          Agcod::Configuration.set(valid_options.merge({
            option => ""                       
          }))
        end
      end 
    end
          
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
agcod-0.1.1 test/macros/configuration.rb
dpickett-agcod-0.0.0 test/macros/configuration.rb
dpickett-agcod-0.0.1 test/macros/configuration.rb
dpickett-agcod-0.0.2 test/macros/configuration.rb
agcod-0.1.0 test/macros/configuration.rb
agcod-0.0.6 test/macros/configuration.rb
agcod-0.0.4 test/macros/configuration.rb
agcod-0.0.3 test/macros/configuration.rb
agcod-0.0.2 test/macros/configuration.rb