Skip to content

Commit

Permalink
mgroups: Add simple tests
Browse files Browse the repository at this point in the history
  • Loading branch information
icy committed Nov 6, 2012
1 parent 475eab7 commit 3bc9991
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/test_process.rb
Expand Up @@ -72,6 +72,22 @@ def test_valid_should_return_false_if_gid_does_not_exists
assert !@p.valid?
end

def test_valid_should_return_true_if_gids_exists
@p.start = 'qux'
@p.log = '/tmp/foo.log'
@p.gids = %w{wheel root}

assert @p.valid?
end

def test_valid_should_return_false_if_gids_does_not_exists
@p.start = 'qux'
@p.log = '/tmp/foo.log'
@p.gids = %w{foobarbaz root}

assert !@p.valid?
end

def test_valid_should_return_true_if_dir_exists
@p.start = 'qux'
@p.log = '/tmp/foo.log'
Expand Down

0 comments on commit 3bc9991

Please sign in to comment.