Sha256: 7c063dc01f1a05afb22d22251adcce49f13a9d41f7c97f508a1efb6881d669de
Contents?: true
Size: 735 Bytes
Versions: 2
Compression:
Stored size: 735 Bytes
Contents
require 'spec_helper' describe 'Node' do it 'should have ip' do expect(Node.new(ip: '10.1.1.1').ip).to eq('10.1.1.1') end it 'should have a #to_ip' do expect(Node.new(ip: '10.1.1.1').ip).to be_a(IPAddr) end unless ENV['CI'] it 'should have mac address' do expect(Node.new(mac: 'aa:cc:dd:ee:ff:gg').mac).to eq('aa:cc:dd:ee:ff:gg') end end it 'should have name' do expect(Node.new(name: 'my iphone').name).to eq('my iphone') end it 'should have ports as string' do expect(Node.new(ports: [22]).ports).to eq('22') end it 'should have compare methods' do node1 = Node.new(ip: '10.1.1.1') node2 = Node.new(ip: '10.1.1.1') expect([node1] - [node2]).to be_empty end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
hooray-0.3.0 | spec/hooray/node_spec.rb |
hooray-0.1.9 | spec/hooray/node_spec.rb |