Class: XSpec::AssertionContext::Doubles::Reference

Inherits:
Object
  • Object
show all
Defined in:
lib/xspec/assertion_contexts.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.



232
233
234
# File 'lib/xspec/assertion_contexts.rb', line 232

def initialize(klass)
  @klass = klass
end

Instance Method Details

#to_sObject



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

def to_s
  @klass.to_s
end

#validate_call!(args) ⇒ Object



236
237
# File 'lib/xspec/assertion_contexts.rb', line 236

def validate_call!(args)
end