Module: Bootable

Included in:
FakeStripe::StubStripeConnect, FakeStripe::StubStripeJS
Defined in:
lib/fake_stripe/bootable.rb

Instance Method Summary collapse

Instance Method Details

#boot(port = FakeStripe::Utils.find_available_port) ⇒ Object



6
7
8
9
# File 'lib/fake_stripe/bootable.rb', line 6

def boot(port = FakeStripe::Utils.find_available_port)
  instance = new
  Capybara::Server.new(instance, port: port).tap(&:boot)
end

#boot_onceObject



11
12
13
# File 'lib/fake_stripe/bootable.rb', line 11

def boot_once
  @boot_once ||= boot(server_port)
end

#server_portObject



15
16
17
# File 'lib/fake_stripe/bootable.rb', line 15

def server_port
  @server_port ||= FakeStripe::Utils.find_available_port
end