Sha256: 5e6dd742fc7c624347bd6db6d2a3ccdfde932e00e8609b58c5d11a574d42b1b2

Contents?: true

Size: 652 Bytes

Versions: 1

Compression:

Stored size: 652 Bytes

Contents

require 'bundler/setup'
require 'cuukie'

require 'cuukie/client'
include Cuukie::Client

def start_process(command)
  Process.detach fork { exec command }
end

def run_cucumber(feature = '')
  system "cd spec/test_project &&
          cucumber features/#{feature} --format cuukie"
end

require 'rest-client'

[:GET, :POST, :PUT, :DELETE].each do |method|
  Kernel.send :define_method, method do |*args|
    args[0] = "http://localhost:4569#{args[0]}"
    RestClient.send method.to_s.downcase, *args
  end
end

def html
  GET('/').body
end

def start_server
  start_process "ruby bin/cuukie --server >/dev/null 2>&1"
  wait_for_server_on_port 4569
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cuukie-0.2.2 spec/spec_helper.rb