inspec/test
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
..
cookbooks/os_prepare call ssh cookbook from prepare cookbook 2017-01-03 11:40:09 +01:00
functional Merge pull request #1454 from jkerry/FunctionalJUnitReporter 2017-02-27 12:00:36 -05:00
integration/default add fallback syntax for serverspec tests 2016-12-15 16:16:17 +01:00
resource Add FreeBSD support for ZFS datasets and pools 2017-02-22 10:29:49 -07:00
unit Provide a method-based accessor for SimpleConfig hashes 2017-03-15 14:49:16 -05:00
docker_run.rb travis experiment: lower docker concurrency 2016-08-10 12:52:21 +01:00
docker_test.rb Load all dependent libraries, even if include_context isn't called 2016-09-04 20:55:20 +02:00
helper.rb Merge pull request #1501 from jbenden/jbenden/freebsd-zfs 2017-03-01 13:06:44 -05:00
test-extra.yaml split up tests for travis 2015-09-23 01:51:51 +02:00
test.yaml split up tests for travis 2015-09-23 01:51:51 +02:00