spec/spec_helper.rb in hawkular-client-0.1.0 vs spec/spec_helper.rb in hawkular-client-0.1.1

- old
+ new

@@ -4,26 +4,30 @@ require 'socket' require 'uri' require 'yaml' module Hawkular::Metrics::RSpec - def setup_client(options = {}) - user, password, url = config['user'], config['password'], config['url'] - @client = Hawkular::Metrics::Client.new(url, user, password, options) + credentials = { + username: config['user'], + password: config['password'] + } + @client = Hawkular::Metrics::Client.new(config['url'], + credentials, options) end - def setup_client_new_tenant(options = {}) - setup_client - @tenant = SecureRandom.uuid - @client.tenants.create(@tenant) - setup_client({:tenant => @tenant}) + def setup_client_new_tenant(_options = {}) + setup_client + @tenant = 'vcr-test-tenant-123' + # @client.tenants.create(@tenant) + setup_client(tenant: @tenant) end def config - @config ||= YAML.load(File.read(File.expand_path("endpoint.yml", File.dirname(__FILE__)))) + @config ||= YAML.load( + File.read(File.expand_path('endpoint.yml', File.dirname(__FILE__))) + ) end - end RSpec.configure do |config| config.include Hawkular::Metrics::RSpec end