Class: Range::FakeClient

Inherits:
Struct
  • Object
show all
Defined in:
lib/range/fake_client.rb

Overview

Provide a fake client for use in testing. Ideally a set of tests should be run against both this and the real client to ensure they are sync.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#responsesObject

Returns the value of attribute responses

Returns:

  • (Object)

    the current value of responses



4
5
6
# File 'lib/range/fake_client.rb', line 4

def responses
  @responses
end

Instance Method Details

#expand(query) ⇒ Object



5
6
7
# File 'lib/range/fake_client.rb', line 5

def expand(query)
  responses.fetch(query)
end