Module: Filet::Integration

Included in:
Filet
Defined in:
lib/filet/integration.rb

Instance Method Summary collapse

Instance Method Details

#base_klassObject



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/filet/integration.rb', line 3

def base_klass
  @@filet_base_klass ||=
    # rails 3
    if defined?(ActionDispatch)
      require 'action_dispatch/testing/integration'
      ActionDispatch::IntegrationTest
    # rails 2
    elsif defined?(ActionController)
      ActionController::IntegrationTest
    elsif defined?(ActiveSupport)
      require 'active_support/test_case'
      ActiveSupport::TestCase
    else
      require 'test/unit/testcase'
      Test::Unit::TestCase
    end
end

#base_klass=(klass) ⇒ Object



21
22
23
# File 'lib/filet/integration.rb', line 21

def base_klass=(klass)
  @@filet_base_klass = klass
end