Sha256: e15f505a11a4ce7ffa1f33f0cbdf0f8b7deecacf0740629e4b91ee170831bb5a

Contents?: true

Size: 605 Bytes

Versions: 3

Compression:

Stored size: 605 Bytes

Contents

$LOAD_PATH.unshift(File.dirname(__FILE__) + '/../../lib')

require 'mechanical-cuke'
require 'cucumber/web/tableish'

require 'test/unit/assertions'

require 'open4'

World(Test::Unit::Assertions)

Before do
  @server ||= {}
  server_app = File.dirname(__FILE__) + '/../../test/fixtures/server/server.rb'
  @server[:pid], @server[:stdin], @server[:stdout], @server[:stderr] =
    Open4::popen4 server_app
  status = @server[:stdout].readline
  raise "Server startup failed" if status !~ /Sinatra.* has taken the stage on/ 
end

After do
  if @server[:pid]
    Process.kill('HUP', @server[:pid])
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
mechanical-cuke-0.3.1 features/support/env.rb
mechanical-cuke-0.3.0 features/support/env.rb
mechanical-cuke-0.2.0 features/support/env.rb