Implement `file_write' action

This commit is contained in:
Thibault Jouan
2013-08-02 15:36:36 +00:00
parent 188ca2e08d
commit 892a9862fc
11 changed files with 111 additions and 8 deletions

View File

@@ -29,10 +29,6 @@ module NetSSHStoryHelpers
end
end
def story_completed?
socket.script.events.empty?
end
def sftp_story
story do |session|
ch = session.opens_channel
@@ -48,4 +44,11 @@ module NetSSHStoryHelpers
yield ch if block_given?
end
end
def expect_story_completed
raise 'there is no story to expect' if socket.script.events.empty?
yield
expect(socket.script.events)
.to be_empty, "#{socket.script.events.count} story events still pending"
end
end