Sha256: ccfc9b5cbb91af37e1df0881fdcbfc9b8cc20de088c0d2646e920f1dc8f009d5

Contents?: true

Size: 566 Bytes

Versions: 104

Compression:

Stored size: 566 Bytes

Contents

#! /usr/bin/env ruby

require '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

104 entries across 104 versions & 2 rubygems

Version Path
facter-1.7.6 spec/unit/util/wmi_spec.rb
facter-2.0.2 spec/unit/util/wmi_spec.rb
facter-2.0.2-x86-mingw32 spec/unit/util/wmi_spec.rb
facter-2.0.2-universal-darwin spec/unit/util/wmi_spec.rb
facter-2.0.1 spec/unit/util/wmi_spec.rb
facter-2.0.1-x86-mingw32 spec/unit/util/wmi_spec.rb
facter-2.0.1-universal-darwin spec/unit/util/wmi_spec.rb
facter-2.0.1.rc4 spec/unit/util/wmi_spec.rb
facter-2.0.1.rc4-x86-mingw32 spec/unit/util/wmi_spec.rb
facter-2.0.1.rc4-universal-darwin spec/unit/util/wmi_spec.rb
facter-2.0.1.rc3 spec/unit/util/wmi_spec.rb
facter-2.0.1.rc3-x86-mingw32 spec/unit/util/wmi_spec.rb
facter-2.0.1.rc3-universal-darwin spec/unit/util/wmi_spec.rb
facter-2.0.1.rc2 spec/unit/util/wmi_spec.rb
facter-2.0.1.rc2-x86-mingw32 spec/unit/util/wmi_spec.rb
facter-2.0.1.rc2-universal-darwin spec/unit/util/wmi_spec.rb
facter-2.0.1.rc1 spec/unit/util/wmi_spec.rb
facter-2.0.1.rc1-x86-mingw32 spec/unit/util/wmi_spec.rb
facter-2.0.1.rc1-universal-darwin spec/unit/util/wmi_spec.rb
facter-1.7.5 spec/unit/util/wmi_spec.rb