require 'revenc/io' Given /^a valid encfs keyfile named "([^\"]*)"$/ do |filename| steps %Q{ Given a file named "#{filename}" with: """ EncFS 1.5 ssl/aes 2 2 nameio/null 1 0 128 1024 0 0 0 0 0 1 36 unVmAfPQFd5t4cakBxbE7uosu4tzZbo8B513iGGNynzArOKM= 20 IcFy11sZw/w7juCI+Cro8AZVp6Q 97493 500 """ } end When /^I run with a lock file present "(.*)"$/ do |cmd| lockfile = File.join(current_dir, 'revenc.lck') Revenc::Mutex.new(lockfile).execute do run(unescape(cmd)) end end Then /^the folder "([^\"]*)" should not be mounted$/ do |folder_name| folder = Revenc::FileFolder.new(File.join(current_dir, folder_name)) folder.exists?.should be_true folder.should be_empty end Then /^the folder "([^\"]*)" should be mounted$/ do |folder_name| folder = Revenc::FileFolder.new(File.join(current_dir, folder_name)) folder.exists?.should be_true folder.should_not be_empty end