Sha256: bf732cc5eeabb22c999a4aa503057c4393c426edff49fa2cd480f77de5c82975

Contents?: true

Size: 577 Bytes

Versions: 3

Compression:

Stored size: 577 Bytes

Contents

class ServiceMock
  def create_directory(key)
    true
  end
  
  def list_directories
    [{:key => 'mykey'}]
  end
  
  def get_directory(key)
    {:key => 'mykey'} || nil
  end
  
  def destroy_directory(key)
    true
  end
  
  
  def list_files(dir_key)
    [{:key => 'mykey/a', :content_length => 5, :last_modified => Time.now}]
  end
  
  def get_file(key)
    {:key => 'mykey/a', :content_length => 5, :last_modified => Time.now, :body => 'asdf'} || nil
  end
  
  def destroy_file(key)
    true || false
  end
  
  def save_file(key, body)
    mtime || false
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
fog-external-0.0.3 spec/service_mock.rb
fog-external-0.0.2 spec/service_mock.rb
fog-external-0.0.1 spec/service_mock.rb