Module: Faraday::LiveServerConfig

Included in:
TestCase
Defined in:
test/helper.rb

Instance Method Summary collapse

Instance Method Details

#live_serverObject

Returns an object that responds to `host` and `port`.


46
47
48
# File 'test/helper.rb', line 46

def live_server
  live_server? and @@live_server
end

#live_server=(value) ⇒ Object


32
33
34
35
36
37
38
39
# File 'test/helper.rb', line 32

def live_server=(value)
  @@live_server = case value
  when /^http/
    URI(value)
  when /./
    URI('http://127.0.0.1:4567')
  end
end

#live_server?Boolean

Returns:

  • (Boolean)

41
42
43
# File 'test/helper.rb', line 41

def live_server?
  defined? @@live_server
end