blob: 8351de116a242b959b7b2ed6306e873f4b8fb5f4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#!/usr/bin/env ruby
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe Facter do
before do
Facter.reset
end
after do
Facter.reset
end
it "should create a new collection if one does not exist" do
Facter.reset
coll = mock('coll')
Facter::Util::Collection.stubs(:new).returns coll
Facter.collection.should equal(coll)
Facter.reset
end
it "should remove the collection when reset" do
old = Facter.collection
Facter.reset
Facter.collection.should_not equal(old)
end
end
|