~gandelman-a/ubuntu/precise/facter/lp888671

« back to all changes in this revision

Viewing changes to spec/unit/interfaces.rb

  • Committer: Bazaar Package Importer
  • Author(s): Andres Rodriguez
  • Date: 2011-05-27 11:27:00 UTC
  • mfrom: (1.1.9 upstream) (3.1.8 sid)
  • Revision ID: james.westby@ubuntu.com-20110527112700-yw7r99d5huf01cnm
Tags: 1.5.9-1ubuntu1
* Merge from debian unstable (LP: #788284).  Remaining changes:
  - Dropped ruby-pkg-tools and libsetup-ruby1.8; debian/rules: use what we
    had in natty; we dont want ruby-pkg-tools in main. (LP: #408402)
* Dropped changes to lib/facter/ec2.rb. (Use the latest-meta api so it
  always does not retunr false). This was fixed upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/env ruby
2
 
 
3
 
require File.dirname(__FILE__) + '/../spec_helper'
4
 
 
5
 
require 'facter'
6
 
 
7
 
describe "Per Interface IP facts" do
8
 
    before do
9
 
        Facter.loadfacts
10
 
    end
11
 
 
12
 
    it "should replace the ':' in an interface list with '_'" do
13
 
        # So we look supported
14
 
        Facter.fact(:kernel).stubs(:value).returns("SunOS")
15
 
 
16
 
        Facter::Util::IP.expects(:get_interfaces).returns %w{eth0:1 eth1:2}
17
 
        Facter.fact(:interfaces).value.should == %{eth0_1,eth1_2}
18
 
    end
19
 
end