Class: SimpleTest::Compare
Instance Attribute Summary collapse
-
#method ⇒ Object
readonly
Returns the value of attribute method.
Instance Method Summary collapse
- #!=(comparison) ⇒ Object
- #==(comparison) ⇒ Object
-
#initialize(expectation) ⇒ Compare
constructor
A new instance of Compare.
- #run ⇒ Object
Constructor Details
#initialize(expectation) ⇒ Compare
Returns a new instance of Compare.
6 7 8 |
# File 'lib/simple_test/compare.rb', line 6 def initialize(expectation) @expectation = expectation end |
Instance Attribute Details
#method ⇒ Object (readonly)
Returns the value of attribute method.
4 5 6 |
# File 'lib/simple_test/compare.rb', line 4 def method @method end |
Instance Method Details
#!=(comparison) ⇒ Object
14 15 16 |
# File 'lib/simple_test/compare.rb', line 14 def !=(comparison) set_info(comparison, :!=) end |
#==(comparison) ⇒ Object
10 11 12 |
# File 'lib/simple_test/compare.rb', line 10 def ==(comparison) set_info(comparison, :==) end |
#run ⇒ Object
18 19 20 |
# File 'lib/simple_test/compare.rb', line 18 def run raise FailingTestError, unless pass? end |