test/host_spec.rb in r7insight-2.7.6 vs test/host_spec.rb in r7insight-3.0.0

- old
+ new

@@ -1,23 +1,27 @@ +# frozen_string_literal: true + require 'spec_helper' - -describe Le::Host do - +describe R7Insight::Host do let(:token) { '11111111-2222-3333-aaaa-bbbbbbbbbbbb' } + let(:region) { 'eu' } let(:local) { false } let(:debug) { false } let(:ssl) { true } let(:udp) { nil } + let(:datahub_endpoint) { ['', 10_000] } + let(:host_id) { '' } + let(:custom_host) { [false, ''] } + let(:use_data_endpoint) { true } - - let(:datahub_endpoint) { ["", 10000] } - let(:host_id) { ""} - let(:custom_host) { [false, ""]} - let(:data_endpoint) {true} - - #let(:host) { Le::Host.new(token, local, debug, ssl) } - let(:host) { Le::Host::HTTP.new(token, local, debug, ssl, datahub_endpoint, host_id, custom_host, udp, data_endpoint) } - specify { host.must_be_instance_of Le::Host::HTTP } - + let(:host) do + R7Insight::Host::CONNECTION.new(token, region, local, debug, ssl, datahub_endpoint, + host_id, custom_host, udp, use_data_endpoint) + end + describe 'host' do + it 'is an instance of CONNECTION' do + assert_instance_of(R7Insight::Host::CONNECTION, host) + end + end end