Sha256: 52ba16d1e9c3b69500d414c78ea8dd7180df9cc3e99d6e0359f7f20168fce2e6

Contents?: true

Size: 965 Bytes

Versions: 16

Compression:

Stored size: 965 Bytes

Contents

require File.expand_path('../../test_case/test_unit', __FILE__)

module TestFile
  module TestUnit
    def setup(project, index)
      super
      test_case_generator.mixin TestCase::TestUnit
      self.directory = File.join(project.directory, 'test')
      test_case_generator.configure do |test_case|
        test_case.superclass = 'Test::Unit::TestCase'
      end
    end

    def content
      content = super
      <<-EOT + content
        require 'test_helper'
        require '#{File.join(project.root_dir, 'spec/support/adapter_tests/test_unit')}'
      EOT
    end

    def filename_prefix
      "#{"%02d" % @index}_test"
    end

    # XXX: Do we need this if this is already in TestUnitTestCase?
    def add_working_test_case_with_adapter_tests
      add_working_test_case do |test_case|
        test_case.add_to_before_tests <<-EOT
          include AdapterTests::TestUnit
        EOT
        yield test_case if block_given?
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
rr-3.1.1 spec/support/test_file/test_unit.rb
rr-3.1.0 spec/support/test_file/test_unit.rb
rr-3.0.9 spec/support/test_file/test_unit.rb
rr-3.0.8 spec/support/test_file/test_unit.rb
rr-3.0.7 spec/support/test_file/test_unit.rb
rr-3.0.6 spec/support/test_file/test_unit.rb
rr-3.0.5 spec/support/test_file/test_unit.rb
rr-3.0.4 spec/support/test_file/test_unit.rb
rr-3.0.3 spec/support/test_file/test_unit.rb
rr-3.0.2 spec/support/test_file/test_unit.rb
rr-3.0.1 spec/support/test_file/test_unit.rb
rr-3.0.0 spec/support/test_file/test_unit.rb
rr-1.2.1 spec/support/test_file/test_unit.rb
rr-1.2.0 spec/support/test_file/test_unit.rb
rr-1.1.2 spec/support/test_file/test_unit.rb
rr-1.1.2.rc1 spec/support/test_file/test_unit.rb