Sha256: f651c81efcc22fa0981d85540d26226c36ae8a34d0515e2be5bd9d076d641d14

Contents?: true

Size: 749 Bytes

Versions: 9

Compression:

Stored size: 749 Bytes

Contents

require 'spec_helper'

include Serverspec::Helper::Cmd
include Serverspec::Helper::Windows

describe group('test.group') do
  it { should exist }
  its(:command) { should eq "(FindGroup -groupName 'test.group') -ne $null" }
end

describe group('test.domain\test.group') do
  it { should exist }
  its(:command) { should eq "(FindGroup -groupName 'test.group' -domain 'test.domain') -ne $null" }
end

describe group('invalid-group') do
  it { should_not exist }
end

describe group('test.group') do
  it "should raise error if command is not supported" do 
    {
      :have_gid => [nil],
    }.each do |method, args|
      expect { should self.send(method, *args) }.to raise_error Serverspec::Commands::Windows::NotSupportedError
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
serverspec-0.11.5 spec/windows/group_spec.rb
serverspec-0.11.4 spec/windows/group_spec.rb
serverspec-0.11.3 spec/windows/group_spec.rb
serverspec-0.11.2 spec/windows/group_spec.rb
serverspec-0.9.4 spec/windows/group_spec.rb
serverspec-0.9.3 spec/windows/group_spec.rb
serverspec-0.9.2 spec/windows/group_spec.rb
serverspec-0.9.1 spec/windows/group_spec.rb
serverspec-0.9.0 spec/windows/group_spec.rb