Sha256: 1efceb805b1f4d375cc97a26e358b2f2fbef580acd4bfd1d11eda86520f04dd0

Contents?: true

Size: 1.16 KB

Versions: 13

Compression:

Stored size: 1.16 KB

Contents

require 'simplecov'
SimpleCov.start

require 'minitest/autorun'
require 'minitest/unit'
require 'mocha/mini_test'

require 'active_record'
require 'active_support/time'
require 'ndr_support'
require 'tmpdir'

NdrSupport.apply_era_date_formats!

# We do not use Rails' preferred time zone support, as this would
# require all dates to be stored in UTC in the database.
# Thus a birth date of 1975-06-01 would be stored as 1975-05-31 23.00.00.
# Instead, we want to store all times in local time.
ActiveRecord::Base.default_timezone = :local
ActiveRecord::Base.time_zone_aware_attributes = false

SafePath.configure! File.dirname(__FILE__) + '/resources/filesystem_paths.yml'

# Borrowed from ActiveSupport::TestCase
module Minitest
  class Test
    # Allow declarive test syntax:
    def self.test(name, &block)
      test_name = "test_#{name.gsub(/\s+/, '_')}".to_sym
      defined = method_defined? test_name
      fail "#{test_name} is already defined in #{self}" if defined
      if block_given?
        define_method(test_name, &block)
      else
        define_method(test_name) do
          flunk "No implementation provided for #{name}"
        end
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
ndr_support-5.3.0 test/test_helper.rb
ndr_support-5.2.0 test/test_helper.rb
ndr_support-5.1.0 test/test_helper.rb
ndr_support-4.2.0 test/test_helper.rb
ndr_support-5.0.0 test/test_helper.rb
ndr_support-4.1.2 test/test_helper.rb
ndr_support-4.1.1 test/test_helper.rb
ndr_support-4.0.1 test/test_helper.rb
ndr_support-4.0.0 test/test_helper.rb
ndr_support-3.3.0 test/test_helper.rb
ndr_support-3.2.1 test/test_helper.rb
ndr_support-3.2.0 test/test_helper.rb
ndr_support-3.1.1 test/test_helper.rb