Sha256: c472a45db0d869fd020cf6fee1607447a2bf12bf600880686d7120d8f2dc5d2e

Contents?: true

Size: 430 Bytes

Versions: 11

Compression:

Stored size: 430 Bytes

Contents

require File.dirname(__FILE__) + '/../test_helper'

class BaseTest < Test::Unit::TestCase
  include ActiveMerchant::Shipping

  def test_get_usps_by_string
    assert_equal USPS, Base.carrier('usps')
    assert_equal USPS, Base.carrier('USPS')
  end

  def test_get_usps_by_name
    assert_equal USPS, Base.carrier(:usps)
  end
  
  def test_get_unknown_carrier
    assert_raise(NameError){ Base.carrier(:polar_north) }
  end
end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
bcarpenter-active_shipping-0.0.2 test/unit/base_test.rb
bcarpenter-active_shipping-0.0.5 test/unit/base_test.rb
bcarpenter-active_shipping-0.0.6 test/unit/base_test.rb
bcarpenter-active_shipping-0.0.7 test/unit/base_test.rb
active_shipping-0.1.4 test/unit/base_test.rb
active_shipping-0.1.3 test/unit/base_test.rb
active_shipping-0.1.2 test/unit/base_test.rb
active_shipping-0.1.1 test/unit/base_test.rb
active_shipping-0.1.0 test/unit/base_test.rb
active_shipping-0.0.2 test/unit/base_test.rb
active_shipping-0.0.1 test/unit/base_test.rb