Class: XSpec::Evaluator::Doubles::Reference

Inherits:
Object
  • Object
show all
Defined in:
lib/xspec/evaluators.rb

Overview

A reference can be thought of as a “backing object” for a double. It provides an API to validate that a method being expected actually exists - the implementation is different for the different types of doubles.

Instance Method Summary collapse

Constructor Details

#initialize(klass) ⇒ Reference

Returns a new instance of Reference.



239
240
241
# File 'lib/xspec/evaluators.rb', line 239

def initialize(klass)
  @klass = klass
end

Instance Method Details

#to_sObject



246
247
248
# File 'lib/xspec/evaluators.rb', line 246

def to_s
  @klass.to_s
end

#validate_call!(args) ⇒ Object



243
244
# File 'lib/xspec/evaluators.rb', line 243

def validate_call!(args)
end