Sha256: aca5c7565fd5497685dccf68191eeb24703feb688bf1dea0cd5a7b97630a7e4e
Contents?: true
Size: 915 Bytes
Versions: 5
Compression:
Stored size: 915 Bytes
Contents
def unix_line_endings(exactly, s) return s if exactly s.gsub(/\r\n/, "\n") end Then /^the remote file "(.*?)" should( exactly)? match the local file$/ do |remote_path, exactly| local_path = File.basename(remote_path) remote_contents = server.file_contents(remote_path) local_contents = client.file_contents(local_path) remote_contents = unix_line_endings(exactly, remote_contents) local_contents = unix_line_endings(exactly, local_contents) expect(remote_contents).to eq local_contents end Then /^the local file "(.*?)" should( exactly)? match the remote file$/ do |local_path, exactly| remote_path = local_path remote_contents = server.file_contents(remote_path) local_contents = client.file_contents(local_path) remote_contents = unix_line_endings(exactly, remote_contents) local_contents = unix_line_endings(exactly, local_contents) expect(local_contents).to eq remote_contents end
Version data entries
5 entries across 5 versions & 2 rubygems