From 048fcd9dba5582412fb6fd8f82927ab924fb70a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Tue, 16 Mar 2010 10:36:16 +0100 Subject: [PATCH] Raise an error if country_select cannot be found. --- test/test_helper.rb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/test/test_helper.rb b/test/test_helper.rb index 4b130f5f..c78be393 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -16,8 +16,14 @@ require 'simple_form' Dir["#{File.dirname(__FILE__)}/support/*.rb"].each { |f| require f } I18n.default_locale = :en -$:.unshift "#{File.dirname(__FILE__)}/support/country_select/lib" -require 'country_select' +country_select = "#{File.dirname(__FILE__)}/support/country_select/lib" + +if File.exists?(country_select) + $:.unshift country_select + require 'country_select' +else + raise "Could not find country_select plugin in test/support. Please execute git submodule update --init." +end class SimpleForm::FormBuilder attr_accessor :attribute_name, :column, :reflection, :input_type, :options