Class: Micron::TestCase
- Inherits:
-
Object
- Object
- Micron::TestCase
- Includes:
- Assertions, LifecycleHooks
- Defined in:
- lib/micron/test_case.rb,
lib/micron/test_case/assertions.rb,
lib/micron/test_case/redir_logging.rb,
lib/micron/test_case/lifecycle_hooks.rb,
lib/micron/test_case/teardown_coverage.rb
Defined Under Namespace
Modules: Assertions, LifecycleHooks, RedirLogging, TeardownCoverage
Constant Summary
Constants included from Assertions
Class Method Summary collapse
-
.after_class ⇒ Object
Run after all test methods in the class.
-
.before_class ⇒ Object
Run before all test methods in the class.
- .inherited(subclass) ⇒ Object
-
.subclasses ⇒ Array<Class>
retrieve all loaded subclasses of this class.
Instance Method Summary collapse
-
#setup ⇒ Object
Run before each test method.
-
#teardown ⇒ Object
Run after each test method.
Methods included from Assertions
#_assertions, #_assertions=, #assert, #assert_empty, #assert_equal, #assert_in_delta, #assert_in_epsilon, #assert_includes, #assert_instance_of, #assert_kind_of, #assert_match, #assert_nil, #assert_operator, #assert_output, #assert_predicate, #assert_raises, #assert_respond_to, #assert_same, #assert_send, #assert_silent, #capture_io, #capture_subprocess_io, #diff, diff, diff=, #exception_details, #flunk, #message, #mu_pp, #mu_pp_for_diff, #pass, #refute, #refute_empty, #refute_equal, #refute_in_delta, #refute_in_epsilon, #refute_includes, #refute_instance_of, #refute_kind_of, #refute_match, #refute_nil, #refute_operator, #refute_predicate, #refute_respond_to, #refute_same, #skip, #skipped?, #synchronize
Methods included from LifecycleHooks
#after_setup, #after_teardown, #before_setup, #before_teardown
Class Method Details
.after_class ⇒ Object
Run after all test methods in the class
17 18 |
# File 'lib/micron/test_case.rb', line 17 def self.after_class end |
.before_class ⇒ Object
Run before all test methods in the class
13 14 |
# File 'lib/micron/test_case.rb', line 13 def self.before_class end |
.inherited(subclass) ⇒ Object
35 36 37 38 39 40 41 |
# File 'lib/micron/test_case.rb', line 35 def self.inherited(subclass) if superclass.respond_to? :inherited superclass.inherited(subclass) end @subclasses ||= [] @subclasses << subclass end |
.subclasses ⇒ Array<Class>
retrieve all loaded subclasses of this class
31 32 33 |
# File 'lib/micron/test_case.rb', line 31 def self.subclasses @subclasses end |
Instance Method Details
#setup ⇒ Object
Run before each test method
21 22 |
# File 'lib/micron/test_case.rb', line 21 def setup end |
#teardown ⇒ Object
Run after each test method
25 26 |
# File 'lib/micron/test_case.rb', line 25 def teardown end |