Class: Minitest::Spec::Expect

Inherits:
Object
  • Object
show all
Defined in:
lib/minitest/spec/expect.rb

Direct Known Subclasses

ForArg, ForBlock

Defined Under Namespace

Classes: ForArg, ForBlock

Constant Summary collapse

OBJECT_UNDER_TEST =
:object_under_test

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(object_under_test) ⇒ Expect

Returns a new instance of Expect.



27
28
29
# File 'lib/minitest/spec/expect.rb', line 27

def initialize object_under_test
  @object_under_test = object_under_test
end

Class Method Details

.create(arg, &block) ⇒ Object



31
32
33
# File 'lib/minitest/spec/expect.rb', line 31

def self.create arg, &block
  block ? ForBlock.new(block) : ForArg.new(arg)
end