Sha256: 037af9d96cae26a82376f4588720a8b961488e6aa2691a153d96baec98ca10af

Contents?: true

Size: 1.61 KB

Versions: 6

Compression:

Stored size: 1.61 KB

Contents

require File.expand_path(File.dirname(__FILE__) + '/spec_helper')

describe('HostMachine') do
  before(:each) do
    @logger = Log4r::Logger.new('host_machine_spec')
  end
  
  it "should parse: localhost" do
    host_machine = HostMachine.new('localhost', @logger)
    host_machine.machine.should == 'localhost'
    host_machine.name.should == 'localhost'
    host_machine.port.should == 9000
  end

  it "should parse: localhost:1234" do
    host_machine = HostMachine.new('localhost:1234', @logger)
    host_machine.machine.should == 'localhost'
    host_machine.name.should == 'localhost:1234'
    host_machine.port.should == 1234
  end
  it "should parse: me@localhost" do
    host_machine = HostMachine.new('me@localhost', @logger)
    host_machine.machine.should == 'localhost'
    host_machine.name.should == 'me@localhost'
    host_machine.port.should == 9000
  end
  it "should parse: me@localhost:1234" do
    host_machine = HostMachine.new('me@localhost:1234', @logger)
    host_machine.machine.should == 'localhost'
    host_machine.name.should == 'me@localhost:1234'
    host_machine.port.should == 1234
  end
  it "should parse: me:sekret@localhost" do
    host_machine = HostMachine.new('me:sekret@localhost', @logger)
    host_machine.machine.should == 'localhost'
    host_machine.name.should == 'me:sekret@localhost'
    host_machine.port.should == 9000
  end
  it "should parse: me:sekret@localhost:1234" do
    host_machine = HostMachine.new('me:sekret@localhost:1234', @logger)
    host_machine.machine.should == 'localhost'
    host_machine.name.should == 'me:sekret@localhost:1234'
    host_machine.port.should == 1234
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
royw-drbman-0.0.1 spec/host_machine_spec.rb
royw-drbman-0.0.2 spec/host_machine_spec.rb
royw-drbman-0.0.3 spec/host_machine_spec.rb
royw-drbman-0.0.4 spec/host_machine_spec.rb
royw-drbman-0.0.5 spec/host_machine_spec.rb
royw-drbman-0.0.6 spec/host_machine_spec.rb