Sha256: 17110828c1fab7ac438929807a32da79d8945d5932976d5c9897f7bf312a9bb6

Contents?: true

Size: 618 Bytes

Versions: 2

Compression:

Stored size: 618 Bytes

Contents

require 'test_helper'

class ServiceTest < Test::Unit::TestCase
  context "A Service" do
    should "be created with host and port" do
      svc = BERTRPC::Service.new('localhost', 9941)
      assert svc.is_a?(BERTRPC::Service)
    end
  end

  context "A Service Instance" do
    setup do
      @svc = BERTRPC::Service.new('localhost', 9941)
    end

    should "return it's host" do
      assert_equal 'localhost', @svc.host
    end

    should "return it's port" do
      assert_equal 9941, @svc.port
    end

    should "return a Call instance" do
      assert @svc.call.is_a?(BERTRPC::CallProxy)
    end
  end
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
mojombo-bertrpc-0.2.0 test/service_test.rb
bertrpc-0.2.0 test/service_test.rb