Sha256: 86f6564e3203f79fdb690d91d2a80d6eb1729493d059e04250f4c358877332df

Contents?: true

Size: 616 Bytes

Versions: 14

Compression:

Stored size: 616 Bytes

Contents

#!/usr/bin/env ruby

require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')

require 'facter/util/wmi'

describe Facter::Util::WMI do
  let(:connection) { stub 'connection' }

  it "should default to localhost" do
    Facter::Util::WMI.wmi_resource_uri.should == "winmgmts:{impersonationLevel=impersonate}!//./root/cimv2"
  end

  it "should execute the query on the connection" do
    Facter::Util::WMI.stubs(:connect).returns(connection)
    connection.stubs(:execquery).with("select * from Win32_OperatingSystem")

    Facter::Util::WMI.execquery("select * from Win32_OperatingSystem")
  end
end

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
supply_drop-0.11.0 examples/vendored-puppet/vendor/facter-1.6.4/spec/unit/util/wmi_spec.rb
supply_drop-0.10.2 examples/vendored-puppet/vendor/facter-1.6.4/spec/unit/util/wmi_spec.rb
supply_drop-0.10.1 examples/vendored-puppet/vendor/facter-1.6.4/spec/unit/util/wmi_spec.rb
supply_drop-0.10.0 examples/vendored-puppet/vendor/facter-1.6.4/spec/unit/util/wmi_spec.rb
supply_drop-0.9.0 examples/vendored-puppet/vendor/facter-1.6.4/spec/unit/util/wmi_spec.rb
supply_drop-0.8.1 examples/vendored-puppet/vendor/facter-1.6.4/spec/unit/util/wmi_spec.rb
supply_drop-0.8.0 examples/vendored-puppet/vendor/facter-1.6.4/spec/unit/util/wmi_spec.rb
supply_drop-0.7.0 examples/vendored-puppet/vendor/facter-1.6.4/spec/unit/util/wmi_spec.rb
supply_drop-0.6.1 examples/vendored-puppet/vendor/facter-1.6.4/spec/unit/util/wmi_spec.rb
supply_drop-0.6.0 examples/vendored-puppet/vendor/facter-1.6.4/spec/unit/util/wmi_spec.rb
facter-1.6.4 spec/unit/util/wmi_spec.rb
facter-1.6.3 spec/unit/util/wmi_spec.rb
facter-1.6.2 spec/unit/util/wmi_spec.rb
facter-1.6.1 spec/unit/util/wmi_spec.rb