blob: 49d5d1f6fac28da4551eccca9d05b922f29b38c6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#!/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
|