inspec/test/unit/utils
Adam Leff ea7c0c493e Provide a method-based accessor for SimpleConfig hashes
When SimpleConfig parses a config file that has sections, such as a mysqld
config file, the values within that section are returned via a Hash. However,
we do not provide an easy way to write tests for those deep hash values:

```
describe mysql_conf('/tmp/my.cnf') do
  its('mysqld.expire_logs_days') { should cmp 10 }
end

  MySQL Configuration
     ∅  undefined method `expire_logs_days' for #<Hash:0x007fe463795a00>
```

This change provides a method-based accessor for Hashes that are built via
SimpleConfig.

```
describe mysql_conf('/tmp/my.cnf') do
  its('mysqld.expire_logs_days') { should cmp 10 }
end

  MySQL Configuration
     ✔  mysqld.expire_logs_days should cmp == 10
```

Fixes #1541 by changing the way the attributes are fetched.

Signed-off-by: Adam Leff <adam@leff.co>
2017-03-15 14:49:16 -05:00
..
bsd_mount_parser_test.rb Add FreeBSD support for ZFS datasets and pools 2017-02-22 10:29:49 -07:00
filter_array_test.rb unit test FilterArray, make retrieved values unique 2016-02-09 11:51:52 +01:00
filter_table_test.rb bugfix: support nil entries in filter table 2016-10-05 13:04:00 +02:00
find_files_test.rb fix optional type argument handling 2015-12-04 14:27:32 +01:00
object_traversal_test.rb Fix ObjectTraverser when accessing array values 2017-03-15 11:35:55 +01:00
passwd_parser_test.rb Ignore comment lines in /etc/passwd 2016-08-16 10:54:52 +02:00
simpleconfig_test.rb Provide a method-based accessor for SimpleConfig hashes 2017-03-15 14:49:16 -05:00
solaris_netstat_parser.rb parse port information on solaris 10 and 11 via netstat 2016-01-28 18:30:38 +01:00