Sha256: 94cc7d756b9acf3a29ed219b472cb3dcda3ef732ecbed58be37f3b48cbab668d

Contents?: true

Size: 1.01 KB

Versions: 4

Compression:

Stored size: 1.01 KB

Contents

# Copyright (c) 2007-2008 Li Xiao <iam@li-xiao.com>
# 
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# 
#     http://www.apache.org/licenses/LICENSE-2.0
# 
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

require 'test/unit/ui/testrunnermediator'

module DTR
  def reject
    return unless Test::Unit::UI::TestRunnerMediator.respond_to?(:reject_dtr)
    Test::Unit::UI::TestRunnerMediator.reject_dtr
  end

  def inject
    return if Test::Unit::UI::TestRunnerMediator.respond_to?(:reject_dtr)
    Test::Unit::UI::TestRunnerMediator.send(:include, TestUnit::TestRunnerMediatorInjection)
  end

  module_function :reject, :inject
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
xli-dtr-1.0.0 lib/dtr/test_unit/injection.rb
xli-dtr-1.1.0 lib/dtr/test_unit/injection.rb
dtr-1.0.0 lib/dtr/test_unit/injection.rb
dtr-1.1.0 lib/dtr/test_unit/injection.rb