From 71ee764d658c1040a7ce36b2b6e6f5bfd3c99e7e Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Fri, 7 Jun 2013 17:08:55 +1000 Subject: [PATCH] Fix travis fails - set deployment before requiring gems, race condition in distributor info spec --- .../enterprises_distributor_info_rich_text_feature_spec.rb | 1 + spec/spec_helper.rb | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/features/chili/enterprises_distributor_info_rich_text_feature_spec.rb b/spec/features/chili/enterprises_distributor_info_rich_text_feature_spec.rb index 85536889fd..6f1c43ab5e 100644 --- a/spec/features/chili/enterprises_distributor_info_rich_text_feature_spec.rb +++ b/spec/features/chili/enterprises_distributor_info_rich_text_feature_spec.rb @@ -73,6 +73,7 @@ feature "enterprises distributor info as rich text" do # -- Purchase email complete_purchase_from_checkout_address_page + sleep 2 # The default timeout for wait_until is not always enough here wait_until { ActionMailer::Base.deliveries.length == 1 } ActionMailer::Base.deliveries.length.should == 1 email = ActionMailer::Base.deliveries.last diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index aaee9d2200..e7cca478e4 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,12 +1,11 @@ require 'simplecov' SimpleCov.start -require 'rubygems' - # By default, test on eaterprises deployment settings # This must be set before rails loads so that it's available in engine initializers ENV['OFW_DEPLOYMENT'] ||= 'eaterprises' +require 'rubygems' ENV["RAILS_ENV"] = 'test' require File.expand_path("../../config/environment", __FILE__)