mirror of
https://github.com/TracksApp/tracks.git
synced 2026-03-03 11:30:15 +01:00
* Ran rake rails:update * Added old actionwebservice framework * Updated RSpec and RSpec-Rails * Removed asset_packager plugin (not compatible, Scott no longer maintaining), and replaced with bundle_fu. See the bundle_fu README for more info. * Hacks to UJS and ARTS plugins, which are no longer supported. Probably should move off both UJS and RJS. * Hack to flashobject_helper plugin (upgrade to Rails 2.2-compatible version if/when it comes out.) * Hack to skinny-spec plugin, for Rails 2.2 compatibility. Should check for official release. * Hacks to resource_feeder plugin, for Rails 2.2 compatibility. Should check for official release (not likely) or move off it. * Addressed some deprecation warnings. More to come. * My mobile mime type hackery is no longer necessary with new Rails features. Yay! * Updated environment.rb.tmpl with changes TODO: * Restore view specs marked pending * Fix failing integration tests. * Try selenium tests. * Investigate OpenID support. * Address deprecation warnings. * Consider moving parts of environment.rb to initializers * Address annoying config.gem warning about highline gem
45 lines
1.3 KiB
Ruby
45 lines
1.3 KiB
Ruby
ENV["RAILS_ENV"] = "test"
|
|
$:.unshift(File.dirname(__FILE__) + '/../lib')
|
|
$:.unshift(File.dirname(__FILE__) + '/../../activesupport/lib')
|
|
$:.unshift(File.dirname(__FILE__) + '/../../actionpack/lib')
|
|
$:.unshift(File.dirname(__FILE__) + '/../../activerecord/lib')
|
|
|
|
require 'test/unit'
|
|
require 'action_web_service'
|
|
require 'action_controller'
|
|
require 'action_controller/test_process'
|
|
|
|
# Show backtraces for deprecated behavior for quicker cleanup.
|
|
ActiveSupport::Deprecation.debug = true
|
|
|
|
|
|
ActionController::Base.logger = Logger.new("debug.log")
|
|
ActionController::Base.ignore_missing_templates = true
|
|
|
|
begin
|
|
PATH_TO_AR = File.dirname(__FILE__) + '/../../activerecord'
|
|
require "#{PATH_TO_AR}/lib/active_record" unless Object.const_defined?(:ActiveRecord)
|
|
require "#{PATH_TO_AR}/lib/active_record/fixtures" unless Object.const_defined?(:Fixtures)
|
|
rescue LoadError => e
|
|
fail "\nFailed to load activerecord: #{e}"
|
|
end
|
|
|
|
ActiveRecord::Base.configurations = {
|
|
'mysql' => {
|
|
:adapter => "mysql",
|
|
:username => "rails",
|
|
:encoding => "utf8",
|
|
:database => "actionwebservice_unittest"
|
|
}
|
|
}
|
|
|
|
ActiveRecord::Base.establish_connection 'mysql'
|
|
|
|
Test::Unit::TestCase.fixture_path = "#{File.dirname(__FILE__)}/fixtures/"
|
|
|
|
# restore default raw_post functionality
|
|
class ActionController::TestRequest
|
|
def raw_post
|
|
super
|
|
end
|
|
end
|