Sha256: 8100dfb8b2676e807d5c731f1f1fdd70aadf7ce23bcb3ed3d95edc5478ce0f20

Contents?: true

Size: 1.06 KB

Versions: 1

Compression:

Stored size: 1.06 KB

Contents

#####################################################################
# test_constants.rb
#
# Tests the constants that have been defined for our package. This
# test case should be run via the 'rake test_constants' task.
#####################################################################
require 'rubygems'
require 'test-unit'
require 'rbconfig'
require 'ptools'

class TC_Ptools_Constants < Test::Unit::TestCase
  def self.startup
    @@windows = File::ALT_SEPARATOR
  end

  test "PTOOLS_VERSION constant is set to expected value" do
    assert_equal('1.2.5', File::PTOOLS_VERSION)
  end

  test "IMAGE_EXT constant is set to array of values" do
    assert_equal(%w[.bmp .gif .jpeg .jpg .png], File::IMAGE_EXT.sort)
  end

  test "WINDOWS constant is defined on MS Windows" do
    omit_unless(@@windows, "Skipping on Unix systems")
    assert_not_nil(File::MSWINDOWS)
  end

  test "WIN32EXTS constant is defiend on MS Windows" do
    omit_unless(@@windows, "Skipping on Unix systems")
    assert_not_nil(File::WIN32EXTS)
  end

  def self.shutdown
    @@windows = nil
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ptools-1.2.5-universal-mingw32 test/test_constants.rb