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__)