test/helper.rb in methodmissing-scrooge-2.2.3 vs test/helper.rb in methodmissing-scrooge-3.0.0

- old
+ new

@@ -1,9 +1,10 @@ require File.join( File.dirname(__FILE__), 'setup' ) require 'rubygems' require 'mocha' require 'active_support/test_case' +ENV["BACKTRACE"] = "1" module Scrooge class Test MODELS_DIR = "#{File.dirname(__FILE__)}/models".freeze @@ -11,11 +12,12 @@ class << self def prepare! require 'test/unit' connect! - require_models() + require File.join( File.dirname(__FILE__), 'scrooge_helper' ) unless defined?(ActiveRecord::Base.connection.class::IGNORED_SQL) + require_models() end def setup! setup_constants! setup_config! @@ -29,11 +31,11 @@ (files ||= [] ) << glob( "#{AR_TEST_SUITE}/cases/**/*_test.rb" ) files.sort end def test_files - glob( "#{File.dirname(__FILE__)}/*_test.rb" ) + glob( "#{File.dirname(__FILE__)}/**/*_test.rb" ) end private def connect! @@ -83,6 +85,6 @@ end end end -Scrooge::Test.setup! \ No newline at end of file +Scrooge::Test.setup!