No commit activity in last 3 years
No release in over 3 years
If you have very heavy-weight setup/teardown methods, this gem allows you to mark tests as pending or omitted on a class level. This will skip calling setup/teardown for that test, but still "pend"/"omit" it like normal.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 2.4.0
 Project Readme

Test::Unit::FasterSkip

This gem allows you to skip setup/teardown for tests that are omitted/pending. If your setup method is very heavy-weight, this can save you a lot of time!

To use FasterSkip, just change this:

class MyTestCase < Test::Unit::TestCase
  def test_cool_feature
    pend('Bug #159: To be implemented.')
    # TODO: Figure out how to test this.
  end

  def test_platform_specific_feature
    omit_if(File::ALT_SEPARATOR, "Skipping test on Windows/VMS")
    # ...
  end
end

To this:

require 'test-unit-fasterskip'
class MyTestCase < Test::Unit::TestCase
  pend('Bug #159: To be implemented.')
  def test_cool_feature
    # TODO: Figure out how to test this.
  end

  omit_if("Skipping test on Windows/VMS") { File::ALT_SEPARATOR }
  def test_platform_specific_feature
    # ...
  end
end

Note that neither setup nor teardown will be run in these scenarios. You can also call omit_unless, which negates the value of the boolean returned by your block. Your omit_if block will be passed the current TestCase instance as its first argument.