Class: Synthesis::Expectation::Instance

Inherits:
Expectation show all
Defined in:
lib/synthesis/expectation.rb

Instance Attribute Summary

Attributes inherited from Expectation

#args, #method, #receiver

Instance Method Summary collapse

Methods inherited from Expectation

#==, #add_return_values, #add_test_subject, #arg_types, #eql?, #explode, #initialize, #invoked!, #invoked?, #record_invocations, #return_value_type, #return_values_defined?, #test_subject

Methods included from Logging

#silence!, #speak!

Constructor Details

This class inherits a constructor from Synthesis::Expectation::Expectation

Instance Method Details

#hashObject



101
102
103
# File 'lib/synthesis/expectation.rb', line 101

def hash
  (meta_receiver.name.hash * 23) + @method.hash
end

#meta_receiverObject



97
98
99
# File 'lib/synthesis/expectation.rb', line 97

def meta_receiver
  @receiver.class
end

#receiver_classObject



105
106
107
# File 'lib/synthesis/expectation.rb', line 105

def receiver_class
  meta_receiver
end

#receiver_reprObject



109
110
111
# File 'lib/synthesis/expectation.rb', line 109

def receiver_repr
  "#{meta_receiver.name}.new"
end