Sha256: 3868294f563599f22d0f8c2fdc8f293505311d6a52f0477c0c559c6a28352beb

Contents?: true

Size: 487 Bytes

Versions: 6

Compression:

Stored size: 487 Bytes

Contents

#!/usr/bin/env ruby

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

require 'facter'

describe "Per Interface IP facts" do
    before do
        Facter.loadfacts
    end

    it "should replace the ':' in an interface list with '_'" do
        # So we look supported
        Facter.fact(:kernel).stubs(:value).returns("SunOS")

        Facter::Util::IP.expects(:get_interfaces).returns %w{eth0:1 eth1:2}
        Facter.fact(:interfaces).value.should == %{eth0_1,eth1_2}
    end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
facter-1.5.8 spec/unit/interfaces.rb
facter-1.5.7 spec/unit/interfaces.rb
facter-1.5.4 spec/unit/interfaces.rb
facter-1.5.6 spec/unit/interfaces.rb
facter-1.5.5 spec/unit/interfaces.rb
facter-1.5.3 spec/unit/interfaces.rb