Sha256: b18d75708ef8ee4a2214969be8e0343544b57b63da2717f58cb1c19d33a33844

Contents?: true

Size: 559 Bytes

Versions: 2

Compression:

Stored size: 559 Bytes

Contents

# frozen_string_literal: true

require 'date'

When /^the client successfully gets mtime of "(.*?)"$/ \
do |remote_path|
  @mtime = client.get_mtime remote_path
end

When /^the client gets mtime of "(.*?)"$/ do |path|
  capture_error do
    step %Q(the client successfully gets mtime of "#{path}")
  end
end

When /^the client gets mtime with no path$/ do
  capture_error do
    client.raw 'MDTM'
  end
end

Then(/^the reported mtime should be "(.*?)"$/) do |mtime|
  expected_time = DateTime.parse(mtime).to_time.utc
  expect(@mtime).to eq expected_time
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ftpd-2.0.1 features/step_definitions/mtime.rb
ftpd-2.0.0 features/step_definitions/mtime.rb