4 def load_provider_lib(*libs)
6 libs.each {|lib| require lib}
8 rescue Gem::LoadError => e
9 warn "Could not load #{lib}: #{e}"
14 HAS_AR = load_provider_lib 'activerecord'
15 HAS_DM = load_provider_lib 'dm-core', 'dm-validations', 'dm-aggregates'
16 HAS_GETTEXT = load_provider_lib 'gettext'
17 HAS_SEQUEL = load_provider_lib 'sequel'
21 Merb::Plugins.config[:merb_global] = {
23 :localedir => File.join('spec', 'locale')
27 require Pathname(__FILE__).dirname.parent.expand_path.to_s + '/lib/merb_global'
29 Merb.start_environment(:testing => true, :adapter => 'runner', :environment => ENV['MERB_ENV'] || 'test')
33 Spec::Runner.configure do |config|
34 config.include(Merb::Test::ControllerHelper)
35 config.mock_with :mocha