Skip to content

Commit

Permalink
add pry to spec_helper
Browse files Browse the repository at this point in the history
make spec a bit more readable, still failing though
  • Loading branch information
peterberkenbosch committed Feb 3, 2015
1 parent cd51884 commit 2788b42
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 4 additions & 1 deletion spec/models/weight_limits_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,10 @@ def build_inventory_unit(variant, order)
context "for international calculators" do
it "should convert package contents to weights array for non-US countries (ex. Canada [limit = 66lbs])" do
weights = international_calculator.send :convert_package_to_weights_array, package
weights.should match_array [20.0, 21.0, 29.0, 60.0, 60.0, 60.0].map{ |x| (x * Spree::ActiveShipping::Config[:unit_multiplier]).to_d }
active_shipping_weights = [20.0, 21.0, 29.0, 60.0, 60.0, 60.0].map do |x|
(x * Spree::ActiveShipping::Config[:unit_multiplier]).to_d
end
weights.should match_array active_shipping_weights
end

it "should create array of packages" do
Expand Down
3 changes: 1 addition & 2 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
require 'rspec/rails'
require 'webmock/rspec'
require 'factory_girl'

require 'pry'
# Run any available migration
ActiveRecord::Migrator.migrate File.expand_path("../dummy/db/migrate/", __FILE__)

Expand Down Expand Up @@ -50,4 +50,3 @@
#config.include Devise::TestHelpers, :type => :controller

end

0 comments on commit 2788b42

Please sign in to comment.