Permalink
Browse files

Add @Remote setup/clear in before/after

Stubbed out some other feature
  • Loading branch information...
catsby committed Feb 14, 2011
1 parent 2d9cf04 commit 31239beef607ae0354015c8fae7b866ee4a4a61c
Showing with 12 additions and 3 deletions.
  1. +12 −3 features/step_definitions/gt_scp_steps.rb
@@ -1,11 +1,13 @@
Before do
FileUtils.mkdir(TEST_DIR)
Dir.chdir(TEST_DIR)
@remote = []
end

After do
Dir.chdir(TEST_DIR)
FileUtils.rm_rf(TEST_DIR)
@remote.clear
end

class Output
@@ -26,7 +28,6 @@ def output
end

Given /^I have ssh keyless auth setup on "([^"]*)"$/ do |remote_host|
@remote = []
@remote << remote_host
end

@@ -38,6 +39,14 @@ def output
@remote[0] = 'clint' + '@' + @remote[0]
end

Given /^I have a valid password setup on "([^"]*)"$/ do |remote_host|
pending # need server I have password but not keyless auth on @remote << remote_host
end

Given /^I specify the "([^"]*)" option$/ do |remote_host|
@remote << remote_host
end

When /^I run "([^"]*)"$/ do |arg1|
GrowlTransfer::DEFAULTS.merge!({'output'=>output})
GrowlTransfer::Download(@remote.join(':'), TEST_DIR)
@@ -47,6 +56,6 @@ def output
output.messages.should include(status)
end

Then /^TEST_DIR should contains "([^"]*)" file$/ do |arg1|
Then /^TEST_DIR should contain "([^"]*)" file$/ do |arg1|
File.file?([TEST_DIR, arg1].join('/'))
end
end

0 comments on commit 31239be

Please sign in to comment.