blob: 0331234993014ddb6d28088f124069994bd3439c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#!/usr/bin/env ruby
require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
require 'facter/util/vlans'
describe Facter::Util::Vlans do
it "should return a list of vlans on Linux" do
sample_output_file = File.dirname(__FILE__) + '/../data/linux_vlan_config'
linux_vlanconfig = File.new(sample_output_file).read();
Facter::Util::Vlans.stubs(:get_vlan_config).returns(linux_vlanconfig)
Facter::Util::Vlans.get_vlans().should == %{400,300,200,100}
end
end
|