Sha256: 45af81e58988260f4b13d9f05912a6067d33255711d1a4244e5c00c50a864bcc

Contents?: true

Size: 805 Bytes

Versions: 9

Compression:

Stored size: 805 Bytes

Contents

# Equivalent to a header guard in C/C++
# Used to prevent the class/module from being loaded more than once
unless defined? LOGGING_TEST_SETUP
LOGGING_TEST_SETUP = true

require 'rubygems'
require 'test/unit'
require 'fileutils'
begin
  require 'turn'
rescue LoadError; end

# This line is needed for Ruby 1.9 -- hashes throw a "KeyError" in 1.9
# whereas they throw an "IndexError" in 1.8
#
KeyError = IndexError if not defined? KeyError

require File.join(File.dirname(__FILE__), %w[.. lib logging])


module TestLogging
module LoggingTestCase

  TMP = 'tmp'

  def setup
    super
    Logging.reset
    FileUtils.rm_rf TMP
    FileUtils.mkdir TMP
  end
    
  def teardown
    super
    FileUtils.rm_rf TMP
  end

end  # module LoggingTestCase
end  # module TestLogging

end  # unless defined?

# EOF

Version data entries

9 entries across 9 versions & 3 rubygems

Version Path
TwP-logging-1.2.2 test/setup.rb
logging-1.4.1 test/setup.rb
logging-1.4.0 test/setup.rb
redcar-0.3.1dev lib/logging/test/setup.rb
redcar-0.3.0dev lib/logging/test/setup.rb
logging-1.3.0 test/setup.rb
redcar-0.2.9dev lib/logging/test/setup.rb
logging-1.2.3 test/setup.rb
logging-1.2.2 test/setup.rb