Module: AbstractClass::TestHelper
- Defined in:
- lib/abstract_class/test_helper.rb
Overview
Contains abstract class testing assertions to include in your test framework
Instance Method Summary collapse
-
#assert_abstract_class(klass) ⇒ Object
Asserts that the specified
klass
has been declared as abstract. -
#assert_not_abstract_class(klass) ⇒ Object
Asserts that the specified
klass
has not been declared as abstract.
Instance Method Details
#assert_abstract_class(klass) ⇒ Object
Asserts that the specified klass
has been declared as abstract
5 6 7 |
# File 'lib/abstract_class/test_helper.rb', line 5 def assert_abstract_class(klass) assert klass.abstract?, "#{klass} was expected to be abstract" end |
#assert_not_abstract_class(klass) ⇒ Object
Asserts that the specified klass
has not been declared as abstract
10 11 12 |
# File 'lib/abstract_class/test_helper.rb', line 10 def assert_not_abstract_class(klass) assert !klass.abstract?, "#{klass} was not expected to be abstract" end |