# This file was generated by the `rspec --init` command. Conventionally, all # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`. # Require this file using `require "spec_helper.rb"` to ensure that it is only # loaded once. # # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration require "bundler" Bundler.require(:default, :development) require "savon/mock/spec_helper" if ENV['COVERAGE'] require 'simplecov' SimpleCov.start else require 'coveralls' Coveralls.wear! end RSpec.configure do |config| config.treat_symbols_as_metadata_keys_with_true_values = true config.run_all_when_everything_filtered = true config.filter_run :focus config.mock_with :rspec end def f method, response File.read File.join(File.expand_path("../fixtures", __FILE__), method.to_s, "#{response.to_s}.xml") end require 'profitbricks' HTTPI.log = false Profitbricks.configure do |config| config.username = "none" config.password = "none" config.polling_interval = 0.1 end client = Savon::Client.new do |globals| globals.namespace "http://ws.api.profitbricks.com/" globals.endpoint "https://api.profitbricks.com/1.2" globals.convert_request_keys_to :lower_camelcase globals.raise_errors true globals.log Profitbricks::Config.log globals.pretty_print_xml true globals.open_timeout 5 globals.read_timeout 5 globals.basic_auth [Profitbricks::Config.username, Profitbricks::Config.password] end Profitbricks.client = client