test/test_helper.rb in track_changes-0.3.2 vs test/test_helper.rb in track_changes-0.4.0

- old
+ new

@@ -1,12 +1,29 @@ -require 'rubygems' -begin - gem 'test-unit' -rescue Gem::LoadError +# Copied from the shoulda library +require 'fileutils' + +# Load the environment +ENV['RAILS_ENV'] = 'test' + +rails_root = File.dirname(__FILE__) + '/rails_root' + +require "#{rails_root}/config/environment.rb" + +# Load the testing framework +require 'test_help' +silence_warnings { RAILS_ENV = ENV['RAILS_ENV'] } + +# Run the migrations +ActiveRecord::Migration.verbose = false +ActiveRecord::Migrator.migrate("#{RAILS_ROOT}/db/migrate") + +# Setup the fixtures path +ActiveSupport::TestCase.fixture_path = + File.join(File.dirname(__FILE__), "fixtures") + +class ActiveSupport::TestCase #:nodoc: + self.use_transactional_fixtures = false + self.use_instantiated_fixtures = false end -require 'test/unit' -require 'shoulda' -require 'mocha' -require 'ostruct' -$LOAD_PATH.unshift(File.dirname(__FILE__)) require 'track_changes' +require 'shoulda'