File: directories_tests.rb

package info (click to toggle)
ruby-fog-local 0.8.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 212 kB
  • sloc: ruby: 709; makefile: 2
file content (18 lines) | stat: -rw-r--r-- 555 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Shindo.tests('Storage[:local] | directories', ["local"]) do

  pending if Fog.mocking?

  @options = { :local_root => Dir.mktmpdir('fog-tests') }
  @collection = Fog::Local::Storage.new(@options).directories

  collection_tests(@collection, {:key => "fogdirtests"}, true)

  tests("#all") do
    tests("succeeds when :local_root does not exist").succeeds do
      FileUtils.remove_entry_secure(@options[:local_root])
      @collection.all
    end
  end

  FileUtils.remove_entry_secure(@options[:local_root]) if File.directory?(@options[:local_root])
end