Sha256: 41c2512455d1124e34bbcab29e097f91a57657766564e292eca47b9da4fc42bf

Contents?: true

Size: 573 Bytes

Versions: 5

Compression:

Stored size: 573 Bytes

Contents

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

require 'mechanical-cuke'

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

5 entries across 5 versions & 1 rubygems

Version Path
mechanical-cuke-0.4.3 features/support/env.rb
mechanical-cuke-0.4.2 features/support/env.rb
mechanical-cuke-0.4.1 features/support/env.rb
mechanical-cuke-0.4.0 features/support/env.rb
mechanical-cuke-0.1.0 features/support/env.rb