File: group_spec.rb

package info (click to toggle)
ruby-specinfra 2.94.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,448 kB
  • sloc: ruby: 10,538; sh: 4; makefile: 4
file content (15 lines) | stat: -rw-r--r-- 545 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
require 'spec_helper'

set :os, { :family => 'darwin' }

describe get_command(:get_group_gid, 'foo') do
  it { should eq "dscl . -read /Groups/foo PrimaryGroupID | awk '{ print $2 }'" }
end

describe get_command(:update_group_gid, 'foo', 1234) do
  it { should eq "dscl . -create /Groups/foo PrimaryGroupID 1234" }
end

describe get_command(:add_group, 'foo', :gid => 1234, :groupname => 'bar') do
  it { should eq 'dscl . -create /Groups/foo && dscl . -create /Groups/foo PrimaryGroupID 1234 && dscl . -create /Groups/foo RecordName bar' }
end