From c08c42b08754efd6fcfcbec60415c4cf50eca4f3 Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Wed, 8 Jan 2014 15:11:38 +1100 Subject: [PATCH] Fix inconsistent test fails - insignificant ordering --- spec/controllers/spree/admin/reports_controller_spec.rb | 2 +- spec/features/admin/shipping_methods_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/controllers/spree/admin/reports_controller_spec.rb b/spec/controllers/spree/admin/reports_controller_spec.rb index 64b4e27e2b..6e2c3b9543 100644 --- a/spec/controllers/spree/admin/reports_controller_spec.rb +++ b/spec/controllers/spree/admin/reports_controller_spec.rb @@ -168,7 +168,7 @@ describe Spree::Admin::ReportsController do it "should build distributors for the current user" do spree_get :products_and_inventory - assigns(:distributors).should == [d1, d2, d3] + assigns(:distributors).sort.should == [d1, d2, d3].sort end it "builds suppliers for the current user" do diff --git a/spec/features/admin/shipping_methods_spec.rb b/spec/features/admin/shipping_methods_spec.rb index 86a2348bd0..575e2b7da4 100644 --- a/spec/features/admin/shipping_methods_spec.rb +++ b/spec/features/admin/shipping_methods_spec.rb @@ -30,7 +30,7 @@ feature 'shipping methods' do sm = Spree::ShippingMethod.last sm.name.should == 'Carrier Pidgeon' - sm.distributors.should == [d1, d2] + sm.distributors.sort.should == [d1, d2].sort end it "at checkout, user can only see shipping methods for their current distributor (checkout spec)"