Sha256: 64a1bb99d733d0b87fec2b8201f2afc8cb9b73452f464c6f799342d10eba8da4

Contents?: true

Size: 591 Bytes

Versions: 7

Compression:

Stored size: 591 Bytes

Contents

#!/usr/bin/env ruby

require 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

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
facter-1.5.8 spec/integration/facter.rb
facter-1.5.7 spec/integration/facter.rb
facter-1.5.5 spec/integration/facter.rb
facter-1.5.4 spec/integration/facter.rb
facter-1.5.3 spec/integration/facter.rb
facter-1.5.2 spec/integration/facter.rb
facter-1.5.6 spec/integration/facter.rb