File: helper.rb

package info (click to toggle)
ruby-fog-openstack 0.1.6-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 4,132 kB
  • ctags: 5,227
  • sloc: ruby: 29,569; makefile: 5; sh: 4
file content (25 lines) | stat: -rw-r--r-- 687 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#require 'coveralls'
#Coveralls.wear!

$:.unshift File.expand_path('../../lib/', __FILE__)
require 'fog/openstack'

#Bundler.require(:test)

Excon.defaults.merge!(:debug_request => true, :debug_response => true)

require File.expand_path(File.join(File.dirname(__FILE__), 'helpers', 'mock_helper'))

# This overrides the default 600 seconds timeout during live test runs
unless Fog.mocking?
  Fog.timeout = ENV['FOG_TEST_TIMEOUT'] || 2_000
  Fog::Logger.warning "Setting default fog timeout to #{Fog.timeout} seconds"
end

def lorem_file
  File.open(File.dirname(__FILE__) + '/lorem.txt', 'r')
end

def array_differences(array_a, array_b)
  (array_a - array_b) | (array_b - array_a)
end