alphagov/vcloud-tools-tester — pull request #8 by mattbostock (2014-06-03 12:50:05+00:00)
Title: [#71834700, #71318046] Dynamically generate attribute reader methods for the test parameters

Dynamically generate attribute reader methods for the test parameters
read in from the YAML-formatted configuration file.

Implementing these methods dynamically means that we don't need to
manually add a new method and bump the version of this gem each time we
change test parameters in the integration tests.

Note that we're using `send` because `define_method` is a private method
and we're calling it from inside the class initalizer.

* * *

Throw a friendly error message using `method_missing` if an undefined
method is called on the TestParameters class, which usually indicates
that an integration test is trying to use a test parameter that has not
been defined or added to the YAML-formatted configuration file consumed
by vCloud Tools Tester.

Add new instance variable, `@config_file`, so that we can access the
name of the configuration file and use it in the error message in
`method_missing`.