Sha256: 2f0e039c5715afd8c2ab3aefdfda1594e025de955fb5a4c1bdd05c336f8f4f1c

Contents?: true

Size: 1.1 KB

Versions: 1

Compression:

Stored size: 1.1 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.2', 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.2-universal-mingw32 test/test_constants.rb