Class: TestTube::Base Private

Inherits:
BasicObject
Defined in:
lib/test_tube/base.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Abstract class representing the state of an experiment.

Direct Known Subclasses

Invoker, Passer

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#actual#object_id (readonly)

Expectation’s actual value.

Returns:

  • (#object_id)

    The actual value.



13
14
15
# File 'lib/test_tube/base.rb', line 13

def actual
  @actual
end

#errorException? (readonly)

Expectation’s raised error.

Returns:

  • (Exception, nil)

    The raised error.



20
21
22
# File 'lib/test_tube/base.rb', line 20

def error
  @error
end

#gotBoolean? (readonly)

Expectation’s returned boolean value.

Returns:

  • (Boolean, nil)

    The returned boolean value.



27
28
29
# File 'lib/test_tube/base.rb', line 27

def got
  @got
end

Instance Method Details

#inspectString Also known as: to_s

A string containing a human-readable representation of the experiment.

Returns:

  • (String)

    The human-readable representation of the experiment.



34
35
36
# File 'lib/test_tube/base.rb', line 34

def inspect
  "<TestTube actual=#{actual.inspect} error=#{error.inspect} got=#{got.inspect}>"
end