Sha256: 7b0cf59da0247d3d7370a05c08fba40942743c8137cf8797f38dde20623b4970

Contents?: true

Size: 1.14 KB

Versions: 13

Compression:

Stored size: 1.14 KB

Contents

require 'test/unit'
require 'rubygems'

# gem install redgreen for colored test output
begin require 'redgreen'; rescue LoadError; end

dirname = File.dirname(__FILE__)
require File.join(dirname, 'boot') unless defined?(ActiveRecord)
require 'action_controller/test_process'
require File.join(dirname, 'lib', 'activerecord_test_connector')

# add plugin's main lib dir to load paths
$:.unshift(File.join(dirname, '..', 'lib')).uniq!

# Test case for inheritance
class ActiveRecordTestCase < Test::Unit::TestCase
  # Set our fixture path
  if ActiveRecordTestConnector.able_to_connect
    self.fixture_path = File.join(File.dirname(__FILE__), 'fixtures')
    self.use_transactional_fixtures = false
  end

  def self.fixtures(*args)
    super if ActiveRecordTestConnector.connected
  end

  def run(*args)
    super if ActiveRecordTestConnector.connected
  end

  # Default so Test::Unit::TestCase doesn't complain
  def test_truth
  end
end

ActiveRecordTestConnector.setup
ActionController::Routing::Routes.reload rescue nil
ActionController::Routing::Routes.draw do |map|
  map.connect ':controller/:action/:id'
end

ActionController::Base.perform_caching = false

Version data entries

13 entries across 13 versions & 4 rubygems

Version Path
cehoffman-acts_as_ferret-0.4.4 doc/demo/vendor/plugins/will_paginate/test/helper.rb
jkraemer-acts_as_ferret-0.4.4 doc/demo/vendor/plugins/will_paginate/test/helper.rb
watson-acts_as_ferret-0.4.8.2 doc/demo/vendor/plugins/will_paginate/test/helper.rb
acts_as_ferret-0.5.2 doc/demo/vendor/plugins/will_paginate/test/helper.rb
acts_as_ferret-0.4.8.2 doc/demo/vendor/plugins/will_paginate/test/helper.rb
acts_as_ferret-0.4.8.1 doc/demo/vendor/plugins/will_paginate/test/helper.rb
acts_as_ferret-0.5.1 doc/demo/vendor/plugins/will_paginate/test/helper.rb
acts_as_ferret-0.5 doc/demo/vendor/plugins/will_paginate/test/helper.rb
acts_as_ferret-0.4.8.rails3 doc/demo/vendor/plugins/will_paginate/test/helper.rb
acts_as_ferret-0.4.8 doc/demo/vendor/plugins/will_paginate/test/helper.rb
acts_as_ferret-0.4.7 doc/demo/vendor/plugins/will_paginate/test/helper.rb
acts_as_ferret-0.4.6 doc/demo/vendor/plugins/will_paginate/test/helper.rb
acts_as_ferret-0.4.4 doc/demo/vendor/plugins/will_paginate/test/helper.rb