Sha256: 6737d02a0b202b6effc22ccaf9a5edeab3f1484df3845cbac9cbe0ed462d4bea

Contents?: true

Size: 927 Bytes

Versions: 9

Compression:

Stored size: 927 Bytes

Contents

# encoding: UTF-8

# Helpers for integration tests
require "rbconfig"
require "rubygems"

# 1.9.2's minitest is way out of date
gem "minitest"

require "minitest/unit"
require "minitest/autorun"
require "tmpdir"
require "pp"


# A test case that reproduces the actions of a user and hence need to run in order
# I.e. I don't suck thank you very much
class OrderedRunner < MiniTest::Unit
  def before_suites
  end

  def after_suites
  end

  def _run_suites(suites, type)
    begin
      before_suites
      super(suites, type)
    ensure
      after_suites
    end
  end

  def _run_suite(suite, type)
    begin
      suite.before_suite if suite.respond_to?(:before_suite)
      super(suite, type)
    ensure
      suite.after_suite if suite.respond_to?(:after_suite)
    end
  end
end

MiniTest::Unit.runner = OrderedRunner.new

class OrderedTestCase < MiniTest::Unit::TestCase
  i_suck_and_my_tests_are_order_dependent!
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
spontaneous-0.2.0.beta10 test/test_integration_helper.rb
spontaneous-0.2.0.beta9 test/test_integration_helper.rb
spontaneous-0.2.0.beta8 test/test_integration_helper.rb
spontaneous-0.2.0.beta7 test/test_integration_helper.rb
spontaneous-0.2.0.beta6 test/test_integration_helper.rb
spontaneous-0.2.0.beta5 test/test_integration_helper.rb
spontaneous-0.2.0.beta4 test/test_integration_helper.rb
spontaneous-0.2.0.beta3 test/test_integration_helper.rb
spontaneous-0.2.0.beta2 test/test_integration_helper.rb