Module: Validity
- Included in:
- Record
- Defined in:
- lib/validity.rb,
lib/validity/record.rb,
lib/validity/frameworks/test_unit/record.rb
Defined Under Namespace
Modules: TestUnit Classes: Record, Unconfigured, Unsupported
Class Method Summary collapse
-
.configure(test_framework) ⇒ Object
Configures Validity to use the provided test_framework.
-
.configured? ⇒ Boolean
Returns whether or not Validity is configured.
-
.reset! ⇒ Object
Resets Validity to an unconfigured state.
-
.supported ⇒ Object
Returns a list of test frameworks Validity supports.
Class Method Details
.configure(test_framework) ⇒ Object
Configures Validity to use the provided test_framework.
-
Args:
-
test_frameworkthe framework to use for testing
-
-
Returns:
-
the test framework Validity was configured to use
-
-
Raises:
-
Unsupportedif the provided test framework is unsupported
-
25 26 27 28 |
# File 'lib/validity.rb', line 25 def self.configure(test_framework) raise Unsupported.new(test_framework) if !supported?(test_framework) @@test_framework = test_framework end |
.configured? ⇒ Boolean
Returns whether or not Validity is configured.
-
Returns:
-
whether or not Validity has been configured
-
34 35 36 |
# File 'lib/validity.rb', line 34 def self.configured? !@@test_framework.nil? end |
.reset! ⇒ Object
Resets Validity to an unconfigured state.
39 40 41 |
# File 'lib/validity.rb', line 39 def self.reset! @@test_framework = nil end |
.supported ⇒ Object
Returns a list of test frameworks Validity supports.
-
Returns:
-
a list of test frameworks Validity supports
-
47 48 49 |
# File 'lib/validity.rb', line 47 def self.supported SUPPORTED end |