Sha256: ac79b74cd83bfe910cc9d3540bb1191f0d48f18cb3426a142f8157abe2842966
Contents?: true
Size: 622 Bytes
Versions: 2
Compression:
Stored size: 622 Bytes
Contents
require 'bundler/setup' require 'support/test_client' PROJECT_ROOT = File.expand_path('../../', __FILE__) SERVER_PORT = 31415 SERVER_IP = '10.0.2.15' RSpec.configure do |config| config.color_enabled = true end def with_test_root(command) <<-BASH cd #{PROJECT_ROOT}/spec/environment && \ #{command} BASH end def start_server @pid = Process.spawn( with_test_root("vagrant foodtaster-server #{SERVER_PORT}"), pgroup: true) sleep 1 end def stop_server Process.kill('INT', -@pid) end def execute(command) system with_test_root(command) end def client @client ||= TestClient.new(SERVER_PORT) end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
vagrant-foodtaster-server-0.0.10 | spec/spec_helper.rb |
vagrant-foodtaster-server-0.0.9 | spec/spec_helper.rb |