Sus SourceSusBase

class Base

The base test case class. We need to be careful about what local state is stored.

Definitions

def before

A hook which is called before the test is executed.

If you override this method, you must call super.

Implementation

def before
end

def after(error = nil)

A hook which is called after the test is executed.

If you override this method, you must call super.

Implementation

def after(error = nil)
end

def around(&block)

Wrap logic around the test being executed.

Invokes the before hook, then the block, then the after hook.

Signature

yields {...}

the block which should execute a test.

Implementation

def around(&block)
	self.before
	
	return block.call
rescue => error
	raise
ensure
	self.after(error)
end

def skip(reason)

Skip the current test with a reason.

Signature

parameter reason String

The reason for skipping the test.

Implementation

def skip(reason)
	@__assertions__.skip(reason)
	throw :skip, reason
end