Module: RubyUnit::Assertions
- Includes:
- Assertions::Collections, Basic, Classes, Comparisons, Exceptions, Methods, Variables
- Included in:
- TestCase
- Defined in:
- lib/RubyUnit/Assertions.rb,
lib/RubyUnit/Assertions/Root.rb,
lib/RubyUnit/Assertions/Basic.rb,
lib/RubyUnit/Assertions/Classes.rb,
lib/RubyUnit/Assertions/Methods.rb,
lib/RubyUnit/Assertions/Variables.rb,
lib/RubyUnit/Assertions/Exceptions.rb,
lib/RubyUnit/Assertions/Comparisons.rb
Overview
Assertions that can be used by RubyUnit::TestCase
Defined Under Namespace
Modules: Basic, Classes, Comparisons, Exceptions, Methods, Root, Variables
Constant Summary collapse
- @@assertions =
Tracks the total number of assertions made during the tests
0
Constants included from AssertionMessage
RubyUnit::AssertionMessage::ASSERT_CLASS_METHOD_ERROR, RubyUnit::AssertionMessage::ASSERT_CONST_DEFINED_ERROR, RubyUnit::AssertionMessage::ASSERT_CONST_ERROR, RubyUnit::AssertionMessage::ASSERT_CONST_NOT_DEFINED_ERROR, RubyUnit::AssertionMessage::ASSERT_DESCENDENT_ERROR, RubyUnit::AssertionMessage::ASSERT_EMPTY_ERROR, RubyUnit::AssertionMessage::ASSERT_EQUAL_ERROR, RubyUnit::AssertionMessage::ASSERT_ERROR, RubyUnit::AssertionMessage::ASSERT_FALSE_ERROR, RubyUnit::AssertionMessage::ASSERT_GREATERTHANOREQUAL_ERROR, RubyUnit::AssertionMessage::ASSERT_GREATERTHAN_ERROR, RubyUnit::AssertionMessage::ASSERT_INCLUDE_ERROR, RubyUnit::AssertionMessage::ASSERT_INSTANCE_METHOD_ERROR, RubyUnit::AssertionMessage::ASSERT_INSTANCE_OF_ERROR, RubyUnit::AssertionMessage::ASSERT_INSTANCE_VARIABLE_DEFINED_ERROR, RubyUnit::AssertionMessage::ASSERT_INSTANCE_VARIABLE_EQUAL_ERROR, RubyUnit::AssertionMessage::ASSERT_INSTANCE_VARIABLE_KIND_OF_ERROR, RubyUnit::AssertionMessage::ASSERT_INSTANCE_VARIABLE_NOT_DEFINED_ERROR, RubyUnit::AssertionMessage::ASSERT_INSTANCE_VARIABLE_NOT_EQUAL_ERROR, RubyUnit::AssertionMessage::ASSERT_INSTANCE_VARIABLE_NOT_KIND_OF_ERROR, RubyUnit::AssertionMessage::ASSERT_KIND_OF_ERROR, RubyUnit::AssertionMessage::ASSERT_LESSTHANOREQUAL_ERROR, RubyUnit::AssertionMessage::ASSERT_LESSTHAN_ERROR, RubyUnit::AssertionMessage::ASSERT_MATCH_ERROR, RubyUnit::AssertionMessage::ASSERT_METHOD_ERROR, RubyUnit::AssertionMessage::ASSERT_NIL_ERROR, RubyUnit::AssertionMessage::ASSERT_NOTHING_RAISED_ERROR, RubyUnit::AssertionMessage::ASSERT_NOT_CLASS_METHOD_ERROR, RubyUnit::AssertionMessage::ASSERT_NOT_DESCENDENT_ERROR, RubyUnit::AssertionMessage::ASSERT_NOT_EMPTY_ERROR, RubyUnit::AssertionMessage::ASSERT_NOT_EQUAL_ERROR, RubyUnit::AssertionMessage::ASSERT_NOT_ERROR, RubyUnit::AssertionMessage::ASSERT_NOT_INCLUDE_ERROR, RubyUnit::AssertionMessage::ASSERT_NOT_INSTANCE_METHOD_ERROR, RubyUnit::AssertionMessage::ASSERT_NOT_INSTANCE_OF_ERROR, RubyUnit::AssertionMessage::ASSERT_NOT_KIND_OF_ERROR, RubyUnit::AssertionMessage::ASSERT_NOT_MATCH_ERROR, RubyUnit::AssertionMessage::ASSERT_NOT_METHOD_ERROR, RubyUnit::AssertionMessage::ASSERT_NOT_NIL_ERROR, RubyUnit::AssertionMessage::ASSERT_NOT_RESPOND_TO_ERROR, RubyUnit::AssertionMessage::ASSERT_NOT_SAME_ERROR, RubyUnit::AssertionMessage::ASSERT_RAISE_ERROR, RubyUnit::AssertionMessage::ASSERT_RAISE_EXPECTED_ERROR, RubyUnit::AssertionMessage::ASSERT_RAISE_KIND_OF_ERROR, RubyUnit::AssertionMessage::ASSERT_RAISE_MESSAGE_ERROR, RubyUnit::AssertionMessage::ASSERT_RESPOND_TO_ERROR, RubyUnit::AssertionMessage::ASSERT_SAME_ERROR, RubyUnit::AssertionMessage::ASSERT_TRUE_ERROR, RubyUnit::AssertionMessage::FAILING, RubyUnit::AssertionMessage::FAILURE
Class Method Summary collapse
-
.add_assertion ⇒ Object
Increment the number of test assertions.
-
.assertions ⇒ Object
Get the current number of test assertions.
Methods included from Variables
#assertInstanceVariableDefined, #assertInstanceVariableEqual, #assertInstanceVariableKindOf, #assertInstanceVariableNotDefined, #assertInstanceVariableNotEqual, #assertInstanceVariableNotKindOf
Methods included from Methods
#assertClassMethod, #assertInstanceMethod, #assertMethod, #assertNotClassMethod, #assertNotInstanceMethod, #assertNotMethod, #assertNotRespondTo, #assertRespondTo
Methods included from Exceptions
#assertNothingRaised, #assertRaiseExpected, #assertRaiseKindOf, #assertRaiseMessage
Methods included from Comparisons
#assertEqual, #assertGreaterThan, #assertGreaterThanOrEqual, #assertLessThan, #assertLessThanOrEqual, #assertMatch, #assertNotEqual, #assertNotMatch, #assertNotSame, #assertSame
Methods included from Classes
#assertConst, #assertConstDefined, #assertConstNotDefined, #assertDescendent, #assertInstanceOf, #assertKindOf, #assertNotDescendent, #assertNotInstanceOf, #assertNotKindOf
Methods included from Basic
#assert, #assertFalse, #assertNil, #assertNot, #assertNotNil, #assertTrue, #fail
Class Method Details
.add_assertion ⇒ Object
Increment the number of test assertions
28 29 30 |
# File 'lib/RubyUnit/Assertions.rb', line 28 def self.add_assertion @@assertions += 1 end |
.assertions ⇒ Object
Get the current number of test assertions
21 22 23 |
# File 'lib/RubyUnit/Assertions.rb', line 21 def self.assertions @@assertions end |