Sha256: cf351eb84ea6fc2b9b91e346ce58aecf032982cdcc6c509cf968287a31d59452

Contents?: true

Size: 612 Bytes

Versions: 3

Compression:

Stored size: 612 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 Mod instance" do
      assert @svc.mymod.is_a?(BERTRPC::Mod)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
mojombo-bertrpc-0.1.0 test/service_test.rb
mojombo-bertrpc-0.1.1 test/service_test.rb
mojombo-bertrpc-0.1.2 test/service_test.rb