Sha256: 6b5183c2b48f8a6cac2ee1e956c15de65433b43cb1eba8b8bf0e973ac13a56c7

Contents?: true

Size: 949 Bytes

Versions: 1

Compression:

Stored size: 949 Bytes

Contents

def server
  @server ||= TestServer.new
end

Given /^the test server is started$/ do
  server.start
end

Given /^the test server has TLS mode "(\w+)"$/ do |mode|
  server.tls = mode.to_sym
end

Given /^the test server has logging (enabled|disabled)$/ do |state|
  server.logging = state == 'enabled'
end

Given /^the test server lacks (\w+)$/ do |feature|
  server.send "#{feature}=", false
end

Given /^the test server has auth level "(.*?)"$/ do |auth_level|
  auth_level = Ftpd.const_get(auth_level)
  server.auth_level = auth_level
end

Given /^the test server has session timeout set to (\S+) seconds$/ do
|timeout|
  server.session_timeout = timeout.to_f
end

Given /^the test server has session timeout disabled$/ do
  server.session_timeout = nil
end

Given /^the test server disallows low data ports$/ do
  server.allow_low_data_ports = false
end

Given /^the test server allows low data ports$/ do
  server.allow_low_data_ports = true
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ftpd-0.5.0 features/ftp_server/step_definitions/test_server.rb