control "ansible-role-ruby-become" do
  title "ansible-role-ruby with privilege escalation role check"

  config = YAML.load_file('defaults/main.yml')
  version = config['ruby_version']
  path = '/opt/rubies/ruby-' + version

  describe directory(path) do
      it { should exist }
      it { should be_owned_by 'root' }
      it { should be_grouped_into 'root' }
      it { should be_readable.by_user('root') }
  end
  
end
