Sha256: 1b65612a2948e55eb1ba0eb60f63a92c14f610cc3df0b089f28e41c06bca48db

Contents?: true

Size: 504 Bytes

Versions: 6

Compression:

Stored size: 504 Bytes

Contents

require 'spec_helper'

describe 'postgres_default_version', :type => :fact do
  it 'should handle redhat 6.0' do
    Facter.fact(:osfamily).stubs(:value).returns 'RedHat'
    Facter.fact(:operatingsystemrelease).stubs(:value).returns '6.0'
    Facter.fact(:postgres_default_version).value.should == '8.4'
  end

  it 'should return unknown if osfamily is unknown' do
    Facter.fact(:osfamily).expects(:value).returns 'test'
    Facter.fact(:postgres_default_version).value.should eq 'unknown'
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
freighthop-0.0.6 modules/postgresql/spec/unit/facts/postgres_default_version_spec.rb
freighthop-0.0.5 modules/postgresql/spec/unit/facts/postgres_default_version_spec.rb
freighthop-0.0.4 modules/postgresql/spec/unit/facts/postgres_default_version_spec.rb
freighthop-0.0.3 modules/postgresql/spec/unit/facts/postgres_default_version_spec.rb
freighthop-0.0.2 modules/postgresql/spec/unit/facts/postgres_default_version_spec.rb
freighthop-0.0.1 modules/postgresql/spec/unit/facts/postgres_default_version_spec.rb