test/test_helper.rb in track_changes-0.5.1 vs test/test_helper.rb in track_changes-1.0.0.pre1
- old
+ new
@@ -1,29 +1,7 @@
-# Copied from the shoulda library
-require 'fileutils'
-
-# Load the environment
ENV['RAILS_ENV'] = 'test'
+require File.expand_path("../railsapp/config/environment.rb", __FILE__)
+require 'rails/test_help'
-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
+def load_schema
+ load(File.dirname(__FILE__) + "/schema.rb")
end
-
-require 'track_changes'
-require 'shoulda'