File: integration.rb

package info (click to toggle)
ruby-mocha 1.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,388 kB
  • ctags: 2,008
  • sloc: ruby: 10,919; makefile: 12
file content (14 lines) | stat: -rw-r--r-- 551 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
require 'mocha/deprecation'
require 'mocha/integration/test_unit'
require 'mocha/integration/mini_test'

module Mocha
  module Integration
    def self.activate
      if [Integration::TestUnit, Integration::MiniTest].map(&:activate).none?
        Deprecation.warning("Test::Unit or MiniTest must be loaded *before* `require 'mocha/setup'`.")
        Deprecation.warning("If you're integrating with a test library other than Test::Unit or MiniTest, you should use `require 'mocha/api'` instead of `require 'mocha/setup'`.")
      end
    end
  end
end