Sha256: 4e37a7eca2a6610adde131109bf0a5118caa3a4d4b51fbcfa905c26da9bb7744

Contents?: true

Size: 576 Bytes

Versions: 11

Compression:

Stored size: 576 Bytes

Contents

require 'spec_helper'

describe OpenStudio::Analysis::ServerApi do
  context 'create a new localhost instance' do
    before(:all) do
      @api = OpenStudio::Analysis::ServerApi.new
    end

    it 'should set the default host to localhost' do
      expect(@api.hostname).to eq('http://localhost:8080')
    end
  end

  context 'test not localhost' do
    it 'should have a not localhost URL' do
      options = { hostname: 'http://abc.def.ghi' }
      api = OpenStudio::Analysis::ServerApi.new(options)
      expect(api.hostname).to eq(options[:hostname])
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
openstudio-analysis-0.3.4 spec/openstudio/analysis/server_api_spec.rb
openstudio-analysis-0.3.3 spec/openstudio/analysis/server_api_spec.rb
openstudio-analysis-0.3.2 spec/openstudio/analysis/server_api_spec.rb
openstudio-analysis-0.3.1 spec/openstudio/analysis/server_api_spec.rb
openstudio-analysis-0.3.0 spec/openstudio/analysis/server_api_spec.rb
openstudio-analysis-0.2.3 spec/openstudio/analysis/server_api_spec.rb
openstudio-analysis-0.2.2 spec/openstudio/analysis/server_api_spec.rb
openstudio-analysis-0.2.1 spec/openstudio/analysis/server_api_spec.rb
openstudio-analysis-0.2.0 spec/openstudio/analysis/server_api_spec.rb
openstudio-analysis-0.1.18 spec/openstudio/analysis/server_api_spec.rb
openstudio-analysis-0.1.17 spec/openstudio/analysis/server_api_spec.rb