Skip to content
This repository has been archived by the owner on Sep 10, 2019. It is now read-only.

Commit

Permalink
Make config param private in the PackageBuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
fredericboivin committed Jun 28, 2016
1 parent c32e9f7 commit dfa4673
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
4 changes: 2 additions & 2 deletions app/models/spree/package_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ def process(solidus_package, max_weight)
to_packages(solidus_package)
end

private

# Configuration
def units
Spree::ActiveShipping::Config[:units].to_sym
Expand All @@ -21,8 +23,6 @@ def default_weight
Spree::ActiveShipping::Config[:default_weight]
end

private

def convert_package_to_weights_array(product_with_product_packages)
weights = product_with_product_packages.map do |content_item|
item_weight = content_item.weight
Expand Down
12 changes: 0 additions & 12 deletions spec/models/package_builder_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,6 @@
allow(package_builder).to receive(:multiplier).and_return(1)
end

it 'has a a unit_multiplier value' do
expect(package_builder.multiplier).not_to be_nil
end

it 'has a a units value' do
expect(package_builder.units).not_to be_nil
end

it 'has a a default_weight value' do
expect(package_builder.default_weight).not_to be_nil
end

describe 'process' do
include_context 'package setup'

Expand Down

0 comments on commit dfa4673

Please sign in to comment.