Module: Testify

Defined in:
lib/testify.rb,
lib/runner.rb,
lib/framework.rb,
lib/middleware.rb,
lib/test_result.rb

Overview

The Testify module provides some general-purpose functions that aren’t specific to any single component.

Defined Under Namespace

Modules: Framework, Middleware, Runner Classes: TestResult

Class Method Summary collapse

Class Method Details

.env_defaultsObject

Provides some reasonable defaults to create a new env hash. This method does not fill in :path or :files, so you’ll need to explicitly specify one or the other.



23
24
25
26
27
28
29
30
31
32
# File 'lib/testify.rb', line 23

def self.env_defaults
  { :testify_version => Testify.version,
    :hooks => { :before_all => [], 
                :after_all => [], 
                :before_each => [], 
                :after_each => [], 
                :after_status => {},
              }
  }
end

.versionObject

Returns the current version as an array. (Eg, version 1.2.3 would be returned as [1, 2, 3].)



37
38
39
# File 'lib/testify.rb', line 37

def self.version
  File.read(File.join(File.dirname(__FILE__), '..', 'VERSION')).chomp.split('.').collect { |n| n.to_i }
end