Module Test::Unit::TestCaseOmissionSupport
In: lib/test/unit/omission.rb

Methods

included   omit   omit_if   omit_unless  

Included Modules

OmissionHandler

Public Class methods

Public Instance methods

Omit the test or part of the test.

Example:

  def test_omission
    omit
    # Not reached here
  end

  def test_omission_with_here
    omit do
      # Not ran here
    end
    # Reached here
  end

Omit the test or part of the test if condition is true.

Example:

  def test_omission
    omit_if("".empty?)
    # Not reached here
  end

  def test_omission_with_here
    omit_if(true) do
      # Not ran here
    end
    omit_if(false) do
      # Reached here
    end
    # Reached here too
  end

Omit the test or part of the test if condition is not true.

Example:

  def test_omission
    omit_unless("string".empty?)
    # Not reached here
  end

  def test_omission_with_here
    omit_unless(true) do
      # Reached here
    end
    omit_unless(false) do
      # Not ran here
    end
    # Reached here too
  end

[Validate]