Exception: Spectro::Exception::UnknownMockResponse

Inherits:
Exception
  • Object
show all
Defined in:
lib/spectro/exception/unknown_mock_response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(file_path, method_name) ⇒ UnknownMockResponse

Returns a new instance of UnknownMockResponse.



9
10
11
12
# File 'lib/spectro/exception/unknown_mock_response.rb', line 9

def initialize file_path, method_name
  self.file_path = file_path
  self.method_name = method_name
end

Instance Attribute Details

#file_pathObject

Returns the value of attribute file_path.



7
8
9
# File 'lib/spectro/exception/unknown_mock_response.rb', line 7

def file_path
  @file_path
end

#method_nameObject

Returns the value of attribute method_name.



7
8
9
# File 'lib/spectro/exception/unknown_mock_response.rb', line 7

def method_name
  @method_name
end

Instance Method Details

#to_sObject



14
15
16
# File 'lib/spectro/exception/unknown_mock_response.rb', line 14

def to_s
  "[##{self.method_name}] mock has not response defined for the given params. Verify the specs at \"#{self.file_path}\"."
end