Skip to content
This repository has been archived by the owner on Mar 3, 2021. It is now read-only.

Commit

Permalink
respond to MKD
Browse files Browse the repository at this point in the history
  • Loading branch information
oestrich authored and sax committed Sep 29, 2013
1 parent 196df79 commit aab6a6d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
5 changes: 5 additions & 0 deletions lib/fake_ftp/server.rb
Expand Up @@ -14,6 +14,7 @@ class Server
cdup
dele
list
mkd
nlst
pass
pasv
Expand Down Expand Up @@ -297,6 +298,10 @@ def _rnto(name = nil)
'250 OK!'
end

def _mkd(directory)
"257 OK!"
end

def active?
@mode == :active
end
Expand Down
9 changes: 2 additions & 7 deletions spec/models/fake_ftp/server_spec.rb
Expand Up @@ -225,11 +225,6 @@
client.puts "CDUP"
client.gets.should == "250 OK!\r\n"
end

it "does not respond to MKD" do
client.puts "MKD some_dir"
client.gets.should == "500 Unknown command\r\n"
end
end

context 'file commands' do
Expand Down Expand Up @@ -394,9 +389,9 @@
@data_server = nil
end

it "does not respond to MKD" do
it 'creates a directory on MKD' do
client.puts "MKD some_dir"
client.gets.should == "500 Unknown command\r\n"
client.gets.should == "257 OK!\r\n"
end

it 'should save the directory after you CWD' do
Expand Down

0 comments on commit aab6a6d

Please sign in to comment.