Sha256: 9b7dd9130e0697bc3403362900b7136779f6c9ccf5d2abfa95f8b4e26bf244cf

Contents?: true

Size: 960 Bytes

Versions: 16

Compression:

Stored size: 960 Bytes

Contents

require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))

module Hoth
  
  describe Endpoint do
  
    it "should have a port" do
      endpoint = Endpoint.new { port 3000 }
      endpoint.port.should == 3000
    end
  
    it "should have a host name" do
      endpoint = Endpoint.new { host "example.com" }
      endpoint.host.should == "example.com"
    end
  
    it "should have a transport name" do
      endpoint = Endpoint.new { transport :json_via_http }
      endpoint.transport.should == :json_via_http
    end
  
    it "should should cast itself to URL string" do
      endpoint = Endpoint.new { port 3000; host "example.com" }
      endpoint.to_url.should == "http://example.com:3000/execute"
    end
    
    it "should should know the deployment module this endpoint is associated to" do
      endpoint = Endpoint.new { module_name "TestModule" }
      endpoint.module_name.should == "TestModule"
    end
  
  end
  
end

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
hoth-0.4.2 spec/unit/endpoint_spec.rb
hoth-0.4.1 spec/unit/endpoint_spec.rb
hoth-0.4.0 spec/unit/endpoint_spec.rb
hoth-0.3.4 spec/unit/endpoint_spec.rb
hoth-0.3.3 spec/unit/endpoint_spec.rb
hoth-0.3.2.beta4 spec/unit/endpoint_spec.rb
hoth-0.3.2.beta3 spec/unit/endpoint_spec.rb
hoth-0.3.2.beta2 spec/unit/endpoint_spec.rb
hoth-0.3.2.beta1 spec/unit/endpoint_spec.rb
hoth-0.3.1 spec/unit/endpoint_spec.rb
sk-hoth-0.3.5 spec/unit/endpoint_spec.rb
sk-hoth-0.3.4 spec/unit/endpoint_spec.rb
sk-hoth-0.3.2 spec/unit/endpoint_spec.rb
sk-hoth-0.3.1 spec/unit/endpoint_spec.rb
sk-hoth-0.3.0 spec/unit/endpoint_spec.rb
hoth-0.3.0 spec/unit/endpoint_spec.rb