Sha256: 54f9641b5f30c00d06fdfa749d678312007d6b38e1d6c89749b540005f569cbd
Contents?: true
Size: 853 Bytes
Versions: 2
Compression:
Stored size: 853 Bytes
Contents
require 'spec_helper' module SimpleShipping describe Ups::PackageBuilder do it_should_behave_like "builders" describe ".build" do before do @package = Package.new(:weight => 1, :height => 1, :width => 1, :length => 1) end it "should include dimensions when packaging_type is 'your'" do package = @package.packaging_type = :your attributes = described_class.build(@package) attributes.should have_key('Dimensions') end (Ups::PackageBuilder::PACKAGING_TYPES.keys - [:your]).each do |type| it "should not include dimensions when packaging_type is '#{type}'" do package = @package.packaging_type = :envelope attributes = described_class.build(@package) attributes.should_not have_key('Dimensions') end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
simple_shipping-0.4.7 | spec/lib/simple_shipping/ups/package_builder_spec.rb |
simple_shipping-0.4.6 | spec/lib/simple_shipping/ups/package_builder_spec.rb |