Run check against all users

Is there any way to run a check against all local users on a system?

i.e.

describe users.each do
    its('maxdays') { should eq 90 }
end

My Ruby is a bit rusty so I could be missing something really straightforward here, but if I can save having to run separate tests for each user it would be a huge time saver.

Running the above example as ‘describe users do’ does give me:

expected: 90
    got: [nil, nil, nil, nil, 90, nil, nil]

Hi @StuartLuscombe
Try creating the loop before the check:

users.each do |u|
  describe user(u) do
      its('maxdays') { should eq 90 }
  end
end