Sha256: 643dfa81f89031d670578369c04ddfa9a3166b655b8e27ca123007f99edcbc23

Contents?: true

Size: 476 Bytes

Versions: 5

Compression:

Stored size: 476 Bytes

Contents

Before do
  @start_time = Time.now
end

When /^the client is idle for (\S+) seconds$/ do |seconds|
  sleep seconds.to_f
end

Then /^it should take at least (\S+) seconds$/ do |s|
  min_elapsed_time = s.to_f
  elapsed_time = Time.now - @start_time
  expect(elapsed_time).to be >= min_elapsed_time
end

Then /^it should take less than (\S+) seconds$/ do |s|
  max_elapsed_time = s.to_f
  elapsed_time = Time.now - @start_time
  expect(elapsed_time).to be < max_elapsed_time
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
ftpd-1.1.1 features/step_definitions/timing.rb
ftpd-1.1.0 features/step_definitions/timing.rb
investtools-ftpd-1.0.1 features/step_definitions/timing.rb
ftpd-1.0.1 features/step_definitions/timing.rb
ftpd-1.0.0 features/step_definitions/timing.rb